Olivier Goffart
118d40d9e9
QtBackend: Timer
2021-01-14 08:53:13 +01:00
Olivier Goffart
7b4c600a4f
Fix compilation after rebase
2021-01-14 08:53:13 +01:00
Olivier Goffart
d4c357195d
Qt backend: make clicking on a TextInput not panic
2021-01-14 08:53:13 +01:00
Olivier Goffart
1eac260d99
Qt Backend: font size fixes
2021-01-14 08:53:13 +01:00
Olivier Goffart
d71bb9ab84
Qt backend: Image rendering
2021-01-14 08:53:13 +01:00
Olivier Goffart
49c9881d10
fix compile
2021-01-14 08:53:13 +01:00
Olivier Goffart
7d91651b48
Qt backend: input events
2021-01-14 08:53:13 +01:00
Olivier Goffart
4aa9faf532
Qt backend: border rectangle
2021-01-14 08:53:13 +01:00
Olivier Goffart
aeb67fa927
Qt backend: Resize event and layouting
2021-01-14 08:53:13 +01:00
Olivier Goffart
531ff42973
WIP: Qt backend using Qt
2021-01-14 08:53:13 +01:00
Simon Hausmann
1ed35fb628
Replace uses of FIELD_OFFSETS.foo.apply_pin(bar) with bar.foo()
2021-01-14 08:53:13 +01:00
Simon Hausmann
65dcb2cb33
Merge BuiltinItem and GeneratePropertyAccessors derive macros
...
... into the new SixtyFPSElement macro. This generates getters for all properties.
2021-01-14 08:53:13 +01:00
Olivier Goffart
9050c29305
Don't use the window through the eventloop module
2021-01-14 08:53:13 +01:00
Olivier Goffart
c7ff67d0fc
Move the ItemRenderer to the item_rendering module
2021-01-14 08:52:22 +01:00
Simon Hausmann
de4194c9ba
Make ItemRenderer take &mut again
...
It's cleaner and indeed possible
2021-01-14 08:52:22 +01:00
Olivier Goffart
16a1b7b2bd
Cache the pixmap in the native style
2021-01-14 08:52:22 +01:00
Simon Hausmann
43127cb059
Implement releasing of textures when items are destroyed
...
This means going back to an immutable renderer reference and interior
mutability for the canvas and the gpu cache. This is because while
traversing the item tree for rendering we may end up destroying
other items due to the lazyness of the models.
2021-01-14 08:52:22 +01:00
Olivier Goffart
b157648ab2
More work towards getting native widget with the femtovg backend
2021-01-14 08:52:22 +01:00
Olivier Goffart
f7c8d53e7a
Port the Qt Native item to the new API
...
this mostly restores code that was removed in commit 1a260b9dce13db38128f1f489633ba96f264d461
2021-01-14 08:52:22 +01:00
Olivier Goffart
4e9021b550
Use a type alias so that cbindgen generates the ItemVTable
2021-01-14 08:52:22 +01:00
Simon Hausmann
d92fe445d5
Remove the old GL renderer
...
and try to stub in the hooks to trigger the new one
2021-01-14 08:52:22 +01:00
Simon Hausmann
d4f603246c
WIP: Start a femtovg backend
2021-01-14 08:52:22 +01:00
Simon Hausmann
8dea0c88d1
Beginning of a different way of rendering items
...
This is the start of a different rendering abstraction, the result of a
separate discussion.
The objective is to provide a better backend encapsulation, that will
make it easier to implement other backends and let the backend decide
what to cache and what not. This is done by passing the struct with the
Property<> fields directly to the backend, so that it can decide what
the cache and what to use every time.
2021-01-14 08:52:22 +01:00
Olivier Goffart
8797f6512d
Rename Slider min/max property
...
For consistency with the SpinBox
Fixes https://github.com/sixtyfpsui/sixtyfps/issues/138
2020-12-30 10:02:38 +01:00
Olivier Goffart
56b67eac8c
Complete the last patch to add a minimum/maximum properties to the SpinBox
2020-12-29 09:44:19 +01:00
Olivier Goffart
16f5a03c14
Run cargo fmt
2020-12-18 10:29:15 +01:00
Olivier Goffart
dfa25b96f7
Rename SharedArray to SharedVector
2020-12-18 10:26:07 +01:00
Olivier Goffart
0d2d48be4f
Rename "signal" to "callback"
2020-12-18 09:51:01 +01:00
Olivier Goffart
2b5213c408
Refactor the rendering variables in a enum instead of an array
...
And finish the ImageFit::contain implementation
2020-12-15 12:16:44 +01:00
Olivier Goffart
26827733ac
Fix: disabled slider should not react to click
2020-12-14 09:44:10 +01:00
Olivier Goffart
63a0d9308b
Bump version
2020-12-14 08:49:54 +01:00
Olivier Goffart
125ec13f24
Bump version numbers
...
Note: this does not update the documentation yet
2020-12-07 15:41:29 +01:00
Olivier Goffart
c18f2ce1cc
Fix disabled widgets in the native style
2020-12-01 10:59:57 +01:00
Olivier Goffart
5bdb9befb5
Use the PopupWindow in the native style combobox
...
Note: the background is not styled yet
2020-11-30 18:39:41 +01:00
Olivier Goffart
c37f0ce4c4
Load the cursor width property from the style
...
Ideally we would put the bindings dirrectly in the builtins.60
But this is unfortunately not possible because the "StyleMetrics" is not
yet available there and that would be a circular dependencies.
2020-11-25 09:58:54 +01:00
Olivier Goffart
0c97b4f296
More use of the ItemRc
2020-11-24 13:42:34 +01:00
Simon Hausmann
3d85e45ec3
Add support for source clipping to the Image element
...
This allows rendering only a sub-rectangle of the original image, which
we can use right away in the sliding puzzle demo.
2020-11-23 15:46:59 +01:00
Simon Hausmann
89e0b57627
Rework and simplify the focus handling
...
Instead of determining the focus item through item tree traversal and
pointer comparison and storing the intermediate indices in the
components in the tree, remember the focus item by a pair of
VWeak<ComponentVTable, Dyn> and item_index: usize.
This speeds up determining the focus item as well as delivering events,
which can now be done directly after retrieving an ItemRef with
get_item_ref.
This also fixes the duplicate line edit focus in the 7gui cells
test case.
2020-11-20 15:33:15 +01:00
Simon Hausmann
0389893df5
Add enabled state to CheckBox/SpinBox/Slider/GroupBox in the native style
2020-11-06 11:09:40 +01:00
Olivier Goffart
f940292182
Rename the builtinf file
2020-11-04 17:11:29 +01:00
Olivier Goffart
281a744e86
Load the builtin from a fake .60 file
2020-11-04 16:56:35 +01:00
Olivier Goffart
8a95b806c7
Strawman implementation of a combo box
2020-11-03 17:55:49 +01:00
Olivier Goffart
59707f068c
add a enabled property on the line edit
2020-11-02 18:20:01 +01:00
Olivier Goffart
a82c23fc41
Add ability for the native style to export native Globals
2020-11-02 16:13:04 +01:00
Olivier Goffart
d2255327fe
Properties: make sure that the falue is different before marking all dependencies dirty
...
Fix the animation of the gauge in the printer demo
2020-10-31 12:58:11 +01:00
Simon Hausmann
c3ba5a0808
Clean up NativeButton
...
Eliminate native_button_enabled
2020-10-30 16:28:06 +01:00
Simon Hausmann
6b7630963f
Add support for disabling a Button
...
This also removes the funny binding on the button in the gallery.
UI wise it's confusing that a button changes its size when pressed, and we can
show off bindings somewhere else :-)
2020-10-30 15:55:18 +01:00
Simon Hausmann
7e305a53fe
Fix rendering of NativeButton and NativeCheckBox
...
* Set the Enabled state throughout the "widgets". This corrects the visual appearance of Button and CheckBox in particular.
* Render a button that's not down as raised, in order to show its outline.
2020-10-30 15:55:18 +01:00
Simon Hausmann
7d3337e1d1
Add missing comment I forgot to stage
2020-10-29 14:56:26 +01:00
Simon Hausmann
aa303d29c5
Fix rendering of scrollbars on macOS
...
The NSScroller is drawn completely disregarding the painter's translation.
So this patch goes for an intermediate image buffer instead.
2020-10-29 14:53:16 +01:00