Lukas Jung
cea17c1958
Add mouse-cursor support to glwindow backend
2021-12-07 22:41:24 +01:00
Lukas Jung
87fe9fe836
Set the mouse-cursor when hovering a TouchArea
2021-12-07 22:41:24 +01:00
Lukas Jung
f0a47ff154
Add mouse-cursor property to TouchArea
2021-12-07 22:41:24 +01:00
Olivier Goffart
c964696e24
Bump winit version
2021-12-07 14:28:31 +01:00
Simon Hausmann
0a60cb1a66
Fix clipping optimiztion for box rectangles
...
The geometry of the box shadow element does not include the offset and
the blur. So our clipping may ignore the shadow when it shouldn't. This
could be changed by making geometry() return bounds that include the
blur and offset, but that in turn will add a visual offset when a
repeated rectangle has a shadow, because the shadow because the root of
the repeated element and the previous rectangle a child.
Fixes #713
2021-12-07 13:06:31 +01:00
Simon Hausmann
957186acb7
Fix drop shadow offset handling with the GL renderer
...
The cached shadow image should just be the cache of the shadow. This
removes a visible "edge" from the shadow sometimes and brings the
rendering in line with the Qt backend.
2021-12-07 13:06:31 +01:00
Olivier Goffart
7ecbf4c81d
Don't use deprecated itertools functions
...
A replacement is available in the std library
2021-12-07 12:10:38 +01:00
Olivier Goffart
9e1e7e3937
Qt backend: simplify the way we set the no-frame flag on the QWidget
2021-12-06 18:52:10 +01:00
Olivier Goffart
310bf897cd
Native ComboBox: style the background of the popup
...
Fixes : #720
2021-12-06 18:52:10 +01:00
Olivier Goffart
2ffa83db0e
Native Style: hover effect on NativeStandardListViewItem
2021-12-06 18:52:10 +01:00
Olivier Goffart
53775465dc
C++: add version macro
...
Fixes #705
2021-12-06 15:36:16 +01:00
Olivier Goffart
f27a2b8c74
Fix issues related to alias to globals
...
two problems
- For the interpreter, properly handle the case of an alias to a global
- For the rust generator, we can't return a reference to a property held
in a global, so we must 'inline' the get_xx funciton on sub-components
2021-12-06 14:30:47 +01:00
Olivier Goffart
464ba195a8
Don't use deprecated API
2021-12-06 13:00:32 +01:00
Olivier Goffart
8b9be10ff8
Attempt to properly detect if the native style is available when cross compiling
...
... and using the sixtyfps! macro
The problem is that the OUT_DIR in the build script of the macro crate
is reporting a target directory for the host (since the macro itself is
built for the host), but we need to get the OUT_DIR of the crate, so query
it in the macro. Unfortunatelty, that env variable is only set when the
crate (using the macro) has a build script. So use a fallback to find the
target directory
Fixes #462
2021-12-06 12:59:48 +01:00
Olivier Goffart
0e5295aa33
Some more improvments to the Flickable docs
...
Complete #716
2021-12-06 12:08:20 +01:00
Jared Moulton
63fd204dda
Update the Flickable and ScrollView docs...
...
...to include mention that the default is for the viewport dimensions to
be calculated automatically and add properties and and an example to the
Flickable docs
2021-12-06 11:59:09 +01:00
Jared Moulton
a3c0771a2a
Update Flickable and ScrollView docs...
...
...to include information about having to manually set the
viewport-width and viewport-height when using a for loop to instantiate
elements.
2021-12-06 11:59:09 +01:00
Olivier Goffart
cd47ef1100
Mark properties that we know are never modified as constant,
...
so that we don't need to register dependencies when accessing them
2021-12-04 22:00:12 +01:00
Olivier Goffart
524a9be377
Mark properies being set by the ListView and FLickable as set externally
...
As we will do more optimisation on constant properties, it is important
to detect the ones that aren't
2021-12-04 22:00:12 +01:00
Olivier Goffart
bc8d556799
Compiler: keep const-ness information of native property in the NativeClass
2021-12-04 22:00:12 +01:00
Olivier Goffart
a90013983b
Add a way to debug the properties behind a configuration flag
...
I used a `#[cfg(..)]` instead of a feature flag because then it is enabled
for both the compiler and the lib at the same time, and since it is only a debug stuff
it does not need to be enabled within the project. So one must enable it with
`RUSTFLAGS='--cfg sixtyfps_debug_property'`
2021-12-04 22:00:12 +01:00
Olivier Goffart
ffe561f8d8
Use SharedVector internally in SharedString
...
Get rid of the triomphe dependency
2021-12-02 12:42:30 +01:00
Olivier Goffart
0e174b6aba
Start working on makeing the generated code no_std
2021-12-01 10:36:29 +01:00
Olivier Goffart
a201c31eaf
Don't use Lazy to initialize the ITEM_TREE, use OnceBox instead
...
Lazy needs std
2021-12-01 10:36:29 +01:00
Olivier Goffart
6b60e832ed
Make sixtyfps-rs compile as a no_std crate
2021-11-30 21:33:32 +01:00
Olivier Goffart
691d43d416
MCU backend: build with no_std
2021-11-30 21:33:32 +01:00
Simon Hausmann
6ca63aac9c
Make it possible to delegate the timer handling to the backend
...
When building with no_std, the backend can provide the global
instant.
2021-11-30 17:27:55 +01:00
Olivier Goffart
6004c4ee2f
Make the std feature optional in sixtyfps-rs
...
And tweak the MCU backend dependencie
2021-11-30 15:48:05 +01:00
Simon Hausmann
bf84bb2ab6
Make floating point operations compile with no_std
...
Use num_traits and libm instead, also for euclid.
2021-11-30 15:33:50 +01:00
Simon Hausmann
e8302452b5
Make it possible to compile sharedvector and sharedstring with atomic-polyfill
2021-11-30 15:32:47 +01:00
Simon Hausmann
b52f41b51f
Fix time for nightly snapshot
...
Since the mechanism seems to work, schnedule it for 4 in the morning (UTC).
That's a low change of interrupting day-to-day work.
2021-11-30 14:33:53 +01:00
Simon Hausmann
855ef6375e
Minor no_std build fix
...
Use core::time::Duration instead of std::time
2021-11-30 12:57:45 +01:00
Simon Hausmann
b475125318
Try a publishing and scheduled snapshot at noon utc
2021-11-30 12:47:21 +01:00
Simon Hausmann
0cbfbcf541
Improve "docs" for the snapshot workflow option
2021-11-30 12:46:22 +01:00
Simon Hausmann
426576bc22
Prospective fix to make scheduled snapshots publish
...
Rename the publish boolean to a private one, so that we can accommodate for the
absence of the boolean in scheduled
builds.
2021-11-30 12:44:47 +01:00
Simon Hausmann
8f4b256da0
Fix components being inadvertendly shown when using Qt
...
Remove a spurious show() call, only an explicit show() should bring up the widget on the screen.
2021-11-30 12:31:51 +01:00
Simon Hausmann
1199821446
Try to build a snapshot periodically
...
Try at 10 and then if it works we can bump it
2021-11-30 09:58:25 +01:00
Olivier Goffart
5a5e87e3cb
Even more fix to no_std thread_local
2021-11-30 09:52:14 +01:00
Olivier Goffart
9a7387e2a6
Another small fix for no_std
2021-11-30 09:38:33 +01:00
Olivier Goffart
4149563817
More fixes with no_std regarding statics and thread_locals
2021-11-30 09:33:39 +01:00
Olivier Goffart
e8271b8f1d
Make corelib work without thread_local in no_std
2021-11-29 21:00:35 +01:00
Simon Hausmann
948f0a1f0b
Document ctrl+x fix
...
cc #691
2021-11-29 17:37:27 +01:00
Simon Hausmann
8f4d5585ae
Fix vrc build to target architecures that need polyfills for atomic ops
2021-11-29 17:28:16 +01:00
Simon Hausmann
dc2f4c0bb4
Add support for no_std to VRcMapped and VWeakMapped
...
Port away from owning_ref, which doesn't support no_std, use a raw pointer instead.
2021-11-29 17:28:16 +01:00
Simon Hausmann
6233cc64f2
Fix build with Qt 5
...
The QPalette workaround is only needed for Qt 6.
2021-11-29 17:18:23 +01:00
Simon Hausmann
e512feb952
Fix reacting to palette changes when using Qt
...
Due to a bug in Qt's implicit sharing in QPalette, the resolve mask of
QGuiApplicationPrivate::app_pal would get changed with an unrelated setColor
call and thus break color resolution from a new base palette when the theme changes.
2021-11-29 17:18:23 +01:00
Olivier Goffart
e4bd6bbfb8
Native style: respond to the StyleChange event
...
So that color scheme is updated when switching to the dark style, for example
Fixes #687
2021-11-29 17:18:23 +01:00
Olivier Goffart
a5ea6dd087
Models: re-implement the internal of model tracking
...
Don't rely on the weak-table that does not work with no_std,
instead, use the same data structure as for the property dependency
tracking
2021-11-29 17:15:56 +01:00
Olivier Goffart
d335ef01c6
Fix sixtyfps-corelib tests when they are run standalone
2021-11-29 17:15:56 +01:00
Olivier Goffart
d8e4c6a887
Properties: Refactor the Dependency tracking in a module
...
So it will be re-used by the models
2021-11-29 17:15:56 +01:00