Commit graph

34 commits

Author SHA1 Message Date
Simon Hausmann
904bc56e62 Introduce Platform.style-name
This replaces the previously hidden `StyleMetrics.style-name` that was only accessible for internal use.
2025-05-06 13:06:27 +02:00
Simon Hausmann
8761eaadeb
Move Palette.style-name to internal protected StyleMetrics.style-name (#8200)
This is only exposed when internal types are exposed (such as in the lsp).

The plan is to make this public under a new name/global after the release.

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2025-04-19 10:20:52 +02:00
Nigel Breslaw
538f8bde19
Allow checking at runtime about the current theme (#8049)
Although std-widgets provides many properties that adapt to the current theme users who would like to go beyond these properties and do theme dependent changes are limited. One option would be to add even more properties to the Palette, however this would potentially bloat the object, it's not obvious what properties users care about and this approach doesn't scale. In many cases developers could simply create their own properties if they knew what the current runtime theme was.

This simple change allows an app to know what the current theme is and present theme appropriate UI's.
2025-04-04 14:44:14 +03:00
FloVanGH
be7c125726
menus: fluent style and refactoring (#7723)
* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-24 17:01:22 +01:00
Olivier Goffart
60c10213d2
Remove LayoutSpec and undeprecate StyleMetrics.layout-* properties (#7069)
StyleMetrics is the right name for these
2024-12-16 14:52:28 +01:00
FloVanGH
c84af1a8d7
std-widgets: added LayoutSpec global (#6711) 2024-11-06 14:47:04 +00:00
Olivier Goffart
686f5e43e2 Widget style: simplify -light/-dark handling
Instead of having all style duplicated and re-using a base, we just hack
into the funciton that queries the dark/light theme based on the style
suffix known at compile time.

This removes one of the problem that happens when trying to work on the
widget style with the extension, as it relies on include path hacks
2024-08-20 16:55:15 +02:00
Olivier Goffart
66370b6bda
Add export { ... } from "....slint"; syntax. (#5533) 2024-07-03 12:50:40 +02:00
Florian Blasius
973ecac989 DatePicker: finished features 2024-06-06 09:03:50 +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
6da8120dfa
added palette global (#3984)
* Update docs/reference/src/language/builtins/globals.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/reference/src/language/builtins/globals.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/reference/src/language/builtins/globals.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/reference/src/language/builtins/globals.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/reference/src/language/builtins/globals.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>


---------

Co-authored-by: Florian Blasius <florian.blasius@slint-ui.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
Co-authored-by: Florian Blasius <flovansl@fedora.fritz.box>
2023-12-11 14:44:05 +00:00
Florian Blasius
6d6b18300a
added focus state to StandardLIstView (#4086)
* added focus state to StandardLIstView

* (wip) focus handling for qt style

* Update CHANGELOG.md

Co-authored-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>

* Share StandardListView between all styles

* Update internal/compiler/widgets/material-base/combobox.slint

Co-authored-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>

* code review feedback

---------

Co-authored-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
2023-12-08 10:58:58 +01: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
871a06224f Add support for fluent-light and fluent-dark styles
These variants of the fluent style will use either the light or the dark color scheme,
regardless of the system wide setting.
2022-10-26 13:30:09 +02:00
Florian Blasius
c58c704f16
Change type of Window background from color to brush (#1755) 2022-10-21 16:17:22 +02:00
Olivier Goffart
94a37c8e16 Move dark-color-sheme builtin in an internal namespace 2022-10-19 15:23:41 +02:00
Olivier Goffart
6ee932883a Rename stark-style to dark-color-scheme
That's the term used by CSS
2022-10-19 15:23:41 +02:00
Olivier Goffart
0ba468c236 Use a builtin function to access the dark-style
instead of a property on NativeStyleMetrics
2022-10-19 15:23:41 +02:00
Simon Hausmann
77441c6686 Fix AboutSlint not adjusting to the dark style
The dark-style property needs to be kept up-to-date with the NativeStyle, like the Palette.
2022-10-18 15:54:57 +02:00
Simon Hausmann
75487f0a9d Add a dark theme for the fluent style
This is computed via the fluent theme designer by swapping text and background.
2022-10-18 15:54:57 +02:00
Olivier Goffart
f6a3e741cf Fix the AboutSlint in fluent style with dark style desktop
The widget should not reach into the NativeStyleMetrics directly,
it should get the information from the StyleMetrics which return
the right value (which is not dark style, for the fluent style)
2022-07-22 12:23:36 +02:00
Tobias Hunger
20c1c45253
Button: Implement support to make the Button a toggle (#1384)
Add flags that enable the Button to be used as a Toggle, e.g. for use in toolbars or similar places.

Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2022-07-08 16:17:06 +02:00
Tobias Hunger
07ad20a09c
Basic Slint accessibility support (#1294)
Implement basic accessibility (a11y) support, using the Qt backend.

_This should get us started, but accessibility support is an additional way to interact with UIs that is very different from the "graphical way" most users will interact with the UI. No single PR will "make a toolkit accessibility", this needs to be an ongoing effort!_

Parts of this PR:

* Add functions to access a11y-related properties to Component
* Add helper functions to Item struct 
* Handle accessible- properties in the compiler
* Add documentation, add description, enforce some basic rules
* Make the Text element accessible by default
* Don't optimize away accessibility property in the LLR
* Ensure that accessibility property are marked as used
* Add some accessibility properties to the native style widgets
* Support for bool and integer `accessible` properties
* Implement basic support for accessibility
* Make basic widgets accessible by default
* Make slider focus-able and interactable with keyboard
* Tell a11y layer about value changes
* Generate QAccessible constants using bindgen
* Don't expose the `accessible` properties when using the MCU backend: There is no backend to make use of them
* Handle focus change based on keyboard focus of the window
* Report accessible widgets at correct positions
* Allow for (virtual) focus delegation at the a11y level
* Calculate value step size dynamically
* Make sure to not send notifications to a11y backend about dead objects
2022-06-08 20:42:10 +02:00
Florian Fetz
d824eef2c5 ScrollBar background is now Palette.white 2022-05-15 14:42:09 +02:00
Tobias Hunger
09f9dbe371 Do not set focus on click for most FocusScopes 2022-04-20 17:07:02 +02:00
Tobias Hunger
c825eee228 janitor: Update global cspell
Update global cspell words and remove some file-wide words.

Also remove a manual test that is now also run as a proper test case.
2022-04-12 12:03:45 +02:00
Tobias Hunger
b33c407878 Make fluent Button accept keyboard focus 2022-04-12 10:48:09 +02:00
Olivier Goffart
9a6c306017 We can now access the global from other globals 2022-02-28 10:14:34 +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
Olivier Goffart
0308f86cd4 Rename sixtyfps_widgets.60 to std-widgets.slint 2022-02-01 18:58:54 +01:00
Renamed from internal/compiler/widgets/fluent/sixtyfps_widgets_impl.60 (Browse further)