Olivier Goffart
844c5cf7ec
Gate the Path item behind the 'std' feature
2021-11-25 16:53:07 +01:00
Olivier Goffart
763065fd0e
Disable the std feature from strum
...
also use its derive feature
2021-11-25 12:02:16 +01:00
Olivier Goffart
80c0602277
WIP: start making the corelib crate a no_std crate
...
Does not compile yet with no_std because of the lack of
alternative for thread_local
2021-11-25 12:02:16 +01:00
Olivier Goffart
1bde79e884
Fix native widgets with C++ on windows
...
The function that expose the vtable was not exported because the declare_item_vtable
expanded to a `#[cfg(feature = "ffi")]` with the intention to be the ffi feature
of the corelib crate. But when this macro is used from the qt backend, the ffi
feature was not set
2021-11-18 10:23:06 +01:00
Simon Hausmann
13de800ba3
Internal cleanup: Rename layouting_info to layout_info
...
That's making the call on the Component VTable consistent(ish) with the Item VTable.
2021-11-08 10:24:30 +01:00
Olivier Goffart
56d592100e
Update a few dependencies
2021-10-21 12:24:48 +02:00
Robert Broketa
c3c7765f80
Add no-frame
property for a borderless/frameless window
2021-10-11 10:21:21 +02:00
Olivier Goffart
503a9b3722
Avoid spurious "cancel" event sent to TouchArea.pointer-event
2021-10-11 10:19:59 +02:00
Olivier Goffart
40e0698373
TouchArea: Grab the mouse regardless of the button
2021-10-11 10:19:59 +02:00
Olivier Goffart
3b6e0e5802
Fixes the PointerEvent.kind always being down
...
Fixes #558
2021-10-08 16:56:35 +02:00
Olivier Goffart
ae3e1b4680
Allow normal Element to be in the Dialog's button row with dialog-button-role
2021-10-05 09:46:20 +02:00
Olivier Goffart
2716e4b4dd
TouchArea: add the pointer-event
callback
...
... instead of `pressed-changed`
This allows to see what mouse button was pressed.
Closes #535
2021-10-04 14:39:49 +02:00
Olivier Goffart
0aecece4ef
Add moved
and pressed-changed
callback to TouchArea
2021-10-01 14:53:25 +02:00
Olivier Goffart
671df0f24f
New widget: StandardButton
2021-09-29 16:25:44 +02:00
Olivier Goffart
ed24492db7
Only emit click when clicking and releasing the mouse within the TouchArea
...
Closes #455
2021-09-04 12:36:13 +02:00
Olivier Goffart
4f1eacd6d8
LineEdit is now able to scroll to keep the cursor visible
2021-09-02 17:20:44 +02:00
Tobias Hunger
cbdea7c9c7
Janitor: Fix clippy::missing_safety_doc
2021-08-09 13:19:34 +02:00
Simon Hausmann
29f5853332
Provide sixtyfps::Window
by reference in the Rust API
...
This also removes Clone from the Window again, to avoid having to face
the question: Does cloning a window duplicate it on the screen?
2021-08-03 10:32:04 +02:00
Olivier Goffart
bd52f4d444
Allow the clip property to be a dynamic property
2021-07-29 15:02:25 +02:00
Simon Hausmann
eaddbe664e
internal cleanup: Rename ComponentWindow to WindowRc
...
That's all it is nowadays, it's a wrapper around Rc<Window>. It's not an
alias because we need to also "wrap" it to C++ via cbindgen, but that's
about it.
2021-07-21 20:33:02 +02:00
Simon Hausmann
77ea5b7a15
API cleanup: hide the rest of the ComponentWindow "internals"
2021-07-21 17:41:12 +02:00
Simon Hausmann
492af0f67c
Rename the implementation of the Window
item to WindowItem
...
If we were to add `sixtyfps:🪟 :Window` to the re_exports, then
this clashes. We might rename the former, but this is a cleaner naming
in any case.
Relates to #333
2021-07-20 17:50:17 +02:00
Olivier Goffart
1360f1e26e
Added icon property to the Window element
2021-07-20 16:34:19 +02:00
Olivier Goffart
1eb54a4743
The clip property now clips the mouse events
...
Fixes #180
Note that there is still a small issue that the clipped element may
not recieve the MouseExit event because it is still considered
having the mouse.
2021-07-12 15:39:39 +02:00
Tobias Hunger
4d712b3f4f
Janitor: Clippy suggests to collapse these ifs
2021-07-06 22:34:21 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Simon Hausmann
035dfc3d1f
A few harmless spelling fixes
2021-06-30 22:14:10 +02:00
Olivier Goffart
ae114cf79d
C++: don't re-export private symbol in the public API
...
Use the cbindgen_private namespace dirrectly from the generated code
2021-06-28 12:03:49 +02:00
Tobias Hunger
13d7f5e7bd
Janitor: Fix typos in comments and user-facing strings
...
Also adapt tests for error messages containing the fixed strings.
No behavior change is intended!
2021-06-28 08:32:25 +02:00
Olivier Goffart
deaa0fddb0
WIP layout: split vertical and horizontal cache
...
Split the vertical and horizontal pass into different property cache
This will allow to implement "height for with"
This patch does not port the Rust or C++ binding yet
2021-06-16 15:14:07 +02:00
Olivier Goffart
b5b715651d
More replacement from ptr::read to drop_in_place
...
Should fix the asserts in C++.
2021-05-31 21:25:41 +02:00
Olivier Goffart
4584c40544
Rename items::Image to ImageItem
...
Because there will be soon a sixtyfps::Image and the names
can't clash
2021-05-28 17:05:16 +02:00
Simon Hausmann
cc9d5e09f0
Add support for clip on Path elements
...
This allows clipping the viewbox conveniently.
2021-05-21 19:51:00 +02:00
Simon Hausmann
e7bc91c804
Add support for specifying the viewbox of path elements
2021-05-21 19:51:00 +02:00
Olivier Goffart
7b2653db23
MouseWheel support for the Flickable
...
cc #222
2021-05-12 13:28:39 +02:00
Olivier Goffart
5f74475224
Refactor the MouseEvent
2021-05-12 12:03:03 +02:00
Olivier Goffart
11158fa922
Remove implicit_size from the Item vtable
...
Use the preferred size in the layouting_info instead.
2021-05-11 14:59:57 +02:00
Olivier Goffart
81473c2541
Remove implicit_size from the Item vtable
...
Use the preferred size in the layouting_info instead.
2021-05-11 14:59:57 +02:00
Simon Hausmann
9ff3b01b54
Remove doc comment that failed to contain the type name
...
Can't use concat! yet in doc attributes, so it looks strange with $ty.
2021-05-11 09:43:14 +02:00
Simon Hausmann
5d6c8e7ee1
Make the export of the vtable getter functions conditional
...
We only need the create these getter functions and export them on Windows
for ffi enabled builds.
2021-05-11 08:03:50 +02:00
Simon Hausmann
c84e6d2945
Export getter functions for all item vtable implementations
2021-05-10 22:54:06 +02:00
Olivier Goffart
3bf3761450
Implement the Opacity filter.
...
Notice that the GL implementation currently don't combine the opacity
2021-04-15 10:17:52 +02:00
Olivier Goffart
ba2f2d5719
Add an Opacity element that does nothing
2021-04-15 10:17:52 +02:00
Simon Hausmann
48e6d2f48b
Fix handling of non-zero border width in clip-enabled Rectangles
...
The border should be visible (as in the included test case), which this
patch fixes for Qt by subtracting the border width just like when drawing.
2021-04-14 13:34:51 +02:00
Simon Hausmann
6a1191c5a5
Add Window.default-font-weight
...
This completes the font properties that can be set as default.
2021-04-14 11:16:22 +02:00
Olivier Goffart
1773f9143b
Add a border-radius property to the Clip
...
So that `clip: true` used on a Rectangle with border radius can be clipped
with that radius
Only the Qt backend is implemented for now
2021-04-12 19:47:18 +02:00
Olivier Goffart
7589a301f2
The stretch factor for the Flickable should be 1
2021-04-09 19:14:48 +02:00
Simon Hausmann
b591f7de2c
Add Window.default-font-size
...
This allows getting rid of the `DemoText` element in the printer demo
2021-03-02 13:33:43 +01:00
Simon Hausmann
27bdb4d481
Added Window.default-font-family
...
One step towards getting rid of `DemoText` in the printer demo
2021-03-02 13:25:21 +01:00
Olivier Goffart
1f318f2d10
Use the new mouse event API for the flickable
...
Issue #166
2021-02-13 16:58:04 +01:00