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>
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.
`ContextMenu` -> `ContextMenuArea`
`ContextMenu` must have a `Menu` child.
`MenuItem` can no longer be put dirrectly in `MenuBar` and can no longer
have children
`Menu` is used now for sub menus
Apply similar logic as to LineEdit and TextEdit, so that when folks build their own text input widgets, they're accessible by default. Also fixed the docs while at it to mention default applications.
Amends #7669
With usual copy/paste entries
We need to make sure that showing the popup window don't clear the
selection in the TextInput which happens if the TextInput gets a
FocusOut event.
* ComboBox: Don't change on scroll uless we have focus
This is what native Windows combobox does.
Otherwise this causes problem when combobox are in scrollable
Fixes#5929
* ComboBox: Don't scroll at all with the wheel on Mac.
This is also Qt's behavior
https://doc.qt.io/qt-6/qstyle.html#:~:text=SH_ComboBox_AllowWheelScrolling
Within the cupertino's ScrollView, the Flickable is positioned
with a 2 pixel margin with the `x` and `y` properties
property, so the width and height should also account for that margin.
Fix the test_cpp_elements_listview in test-driver-cpp
- Rename `accessible-selectable` and `accessible-selected` to `accessible-item-{selectable,selected}`.
Because the property is for items in list rather than eg Text
- Rename `accessible-position-in-set` to `accessible-item-index`.
- Rename `accessible-size-of-set` to `accessible-item-count` and move
the property to the container element rather than the item itself
* creating a lookup table of colors based on the set on apple docs
then selecting from these colors rather than always typing hex
also added an in property for setting selected color (future)
* splitting out method of changing selection colour for later
* forgot to pull CupertinoColors from import
* Squashed commit of the following:
commit 4924aa908d6e039a7bf1f79ede3dc7c26f71007f
Author: szecket <szecket@magrittescow.com>
Date: Fri Nov 15 17:31:45 2024 -0500
use defined Palette for states
commit 80711ee7188f37b1b29ce11855b6a636d7a39306
Author: szecket <szecket@magrittescow.com>
Date: Fri Nov 15 17:29:51 2024 -0500
make control colour consistent with style and other controls
commit 1cfd39e6da6643600e8b553dfab2418c8552cdc4
Author: szecket <szecket@magrittescow.com>
Date: Fri Nov 15 13:58:07 2024 -0500
selection of controls when focused is not current cupertino style and too strong
commit 4bf4ae6ad385e118687f752362b34e079c03fe22
Author: szecket <szecket@magrittescow.com>
Date: Fri Nov 15 13:42:58 2024 -0500
make foreground color contrast when selected
* removing property that is only in cupertino