Commit graph

41 commits

Author SHA1 Message Date
Olivier Goffart
3823c1e8da Experimental support for Drag & Drop
Add a `DragArea` and `DropArea` elements.
It is currently gated as experimental.
2025-06-26 15:39:18 +02:00
Olivier Goffart
47a556d0e7 Core: Pass the MouseEvent by reference
(Prepare to add non-copy data in it)
2025-06-26 15:39:18 +02:00
Simon Hausmann
eb825f2e95 Support default-font-* properties in Live-Preview
... by changing the resolution for the `WindowItem` to traverse the
item tree from the current item, instead of going to the window.

This doesn't quite fix #4298 because `rem` resolution is still missing.
That requires the built-in default font size function to be fixed as
well, which is non-trivial.

cc #4298
2025-04-24 09:18:45 +02:00
Simon Hausmann
8372cd6412
Convey clipping of children to accesskit (#7587)
and while at it, move is_clipping_item() that casts a function of the ItemVTable.

Fixes #2341
Fixes #7382
2025-02-10 13:42:10 +01:00
Simon Hausmann
a4709b211e Cleanup: Rename bounding_rect_for_geometry to bounding_rect 2025-01-30 10:55:28 +01:00
Simon Hausmann
4a6b4d9dfa Add support for bounding text rendering with the partial renderer
cc #7247
2025-01-30 10:55:28 +01:00
Simon Hausmann
58ea5389f8 Add support for box shadows with the partial renderer
cc #7247

Fix comment in partial renderer's filter_item() about dependency tracking

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2025-01-30 10:55:28 +01:00
FloVanGH
901afde11f
api review: callback parameters and properties name adjustements 2024-12-02 16:22:39 +00:00
Renato Araujo Oliveira Filho
1e4de3fe0c
Implement ScrollBarPolicy property for ScrollView (#6442)
ChangeLog: ScrollView: added  vertical-bar-policy and horizontal-bar-policy

Fixes: #3552
Fixes: #5578
2024-10-08 17:02:17 +02:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License (#4994)
Updated the version from 1.1 to 1.2 
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Florian Blasius
030cf2cd19
Update scroll offset on ScrollView on ScrollBar scroll-event (#3668) 2023-10-16 10:41:39 +02:00
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
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
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
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
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
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
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
Renamed from sixtyfps_runtime/rendering_backends/qt/qt_widgets/scrollview.rs (Browse further)