Olivier Goffart
d3ed4dfad0
Qt Widgets: set the preferred-size to the minimum-size
...
Instead of setting it to 0 which cause `widget.preferred-width` ti be 0
Fixes #3527
2023-09-22 14:31:46 +02:00
Thorbjørn Lindeijer
7ee17d0914
Native style: Fixed scroll bar handle size for ScrollView ( #3489 )
...
This reverts commit 07f42afef3
, but applies
the same change specifically to the Slider, without affecting the
ScrollView.
The scaling up by factor 1024.0 of the min, max and value caused problems
for the ScrollView, which needs these values to match the viewport size
in order to correctly calculate the size of the scrollbar handle.
2023-09-19 10:07:25 +02:00
Guilhem Vallat
5cf1a45e41
Remove duplicated geometry properties from items
2023-09-13 16:08:37 +02:00
Olivier Goffart
06fc251729
Remove the geometry on ItemVTable
2023-09-13 16:08:37 +02:00
Olivier Goffart
4920224be0
Rename Slider::vertical to Slider::orientation
2023-08-30 13:43:59 +02:00
Olivier Goffart
8884ce3565
Native Style: don't call initFrom on QStyleOption
...
This adds the enabled state which we don't need
2023-08-17 20:44:51 +02:00
Eric
4b9fb89332
add property for slider to support vertical orientation ( #3236 )
2023-08-16 09:58:50 +02:00
Tobias Hunger
d47d52bf52
ItemVTable::init(...): Take an ItemRc so that the itan can know where in the Item Tree it is located
2023-07-27 12:04:16 +02:00
Simon Hausmann
64f1504ab9
Fix rendering of QStyle animations
...
Allocate a widget per NativeXXX. This way QStyleAnimation objects
created by Qt aren't shared among style options.
Fixes #2045
Fixes #2987
2023-07-14 13:09:45 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 ( #2994 )
2023-07-10 10:12:11 +02:00
Simon Hausmann
07f42afef3
Fix support normalized ranges for Slider with Qt style
...
The OpenGL Texture import example uses a Slider in the range 0..1. That doesn't work with
QStyleOptionSlider out of the box because it's
using integer values.
2023-06-28 17:42:34 +02:00
Tobias Hunger
e02c360000
Clippy polish
2023-06-28 14:22:30 +02:00
Olivier Goffart
11dea135f7
Domain: slint-ui.com -> slint.dev
2023-06-16 10:55:08 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs ( #2888 )
2023-06-15 11:20:50 +02:00
Simon Hausmann
01b00d26eb
Rust: Allocate the window adapter lazily
...
This will be needed for embedding - to avoid creating two window
adapters - and it will be needed for the API to allow creating a
component from an existing window.
2023-06-10 11:41:04 +02:00
Tobias Hunger
3ac01c3f07
clippy: Fix clippy warnings
2023-03-09 09:35:29 +01:00
Florian Blasius
d84de623b4
TextEdit select text with double and dribble click ( #2088 )
...
* Select word in `TextEdit` by double click
* Select paragraph in `TextEdit` by dribble click
2023-01-31 15:04:19 +01:00
Simon Hausmann
c16253d29f
Use Property<LogicalLength> instead of Property<Coord>
...
This removes the special code for the generated property getters and
ensures type safety in the run-time library for property value setting.
In the Rust generated code we continue to do arithmetic on the scalar
values, that means we immediately extract the scalar, do arithmetic and
rely on the compiler to only allow compatible units.
Danger zone alert: In the interpreter Value::Number can now be converted
to LogicalLength as-is.
2022-10-24 12:49:37 +02:00
Simon Hausmann
c11b4305c1
Change Item::geometry() to return a LogicalRect
2022-10-13 17:02:18 +02:00
Simon Hausmann
c40b82c509
Add ItemRc to focus_event and key_event
...
This will be needed to compute the cursor rectangle in window coordinates, by
traversal of the parent chain.
2022-10-07 11:16:36 +02:00
Simon Hausmann
7e5de3d5d3
Remove use of euclid types and tags for logical/physical position and size in the public API
...
Instead provide our own types.
2022-09-02 11:05:53 +02:00
Tobias Hunger
1e6ffeaa0f
API cleanup: Rename PlatformWindow to WindowAdapter
2022-08-29 16:53:47 +02:00
Simon Hausmann
1d436778c1
Remove the use of the PlatformWindowRc alias again
...
and use Rc<dyn PlatformWindow> instead. The alias has to stay with the ffi
functions though and the item vtable definitions,
because we don't have an Rc<> template in C++.
2022-08-19 15:07:27 +02:00
Simon Hausmann
fd026a3991
Change itemtable to use &PlatformWindowRc instead of &WindowInner
...
The former is cbindgen friendly, the latter is entirely Rust internal.
2022-08-19 15:07:27 +02:00
Simon Hausmann
b0b8d8d899
Change the Item vtable to take a &WindowInner instead of &WindowRc
...
... in preparation for storing an Rc<dyn PlatformWindow> in the component.
This won't compile with C++ yet.
2022-08-19 15:07:27 +02:00
Olivier Goffart
a62a5cbd19
Rename MouseEvent pos
to position
2022-08-17 18:28:12 +02:00
Olivier Goffart
61739dcb81
Remove the Mouse
prefix from enum value of the MouseEvent
enum
2022-08-17 18:28:12 +02:00
Olivier Goffart
ac4f3e97ad
Change slint enum values to be PascalCase in rust
...
... while still being kebab-case in .slint
Some enums might become public API and we want to have them as
PascalCase to respect the rust conventions
2022-07-22 12:23:52 +02:00
Olivier Goffart
0c19751a1e
Qt: do not wrap QPainter directly, but use a unique_ptr instead
...
Because QPainter can't be relocated.
Fixes #1230
2022-05-05 13:50:26 +02:00
Tobias Hunger
6795d3ee00
Introduce a FocusEventResult enum ( #975 )
2022-02-21 17:43:41 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
...
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
...
The README.md contains the warning that used to be in lib.rs.
Add README.md files to all internal crates
... pointing to the official public crate to use instead.
Rename internal crates
fixup: README files
fixup rename
2022-02-07 13:12:48 +01:00
Olivier Goffart
c00884d5a2
Rename SixtyFPSElement
2022-02-02 14:29:30 +01:00
Simon Hausmann
7d297da2fc
Rename the sixtyfps C++ namespaces
2022-02-02 12:11:27 +01:00
Simon Hausmann
ad0c020aa4
Rename the sixtyfps-corelib crate
2022-02-01 18:04:30 +01:00
Tobias Hunger
a3b86690ff
[reorg]: Move the rendering backends into internal
2022-01-31 16:00:50 +01:00