mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
Changelog: Add accessible-selectable
and accessible-selected
properties
This commit is contained in:
parent
66ebcbd1b7
commit
19f09950c2
8 changed files with 60 additions and 0 deletions
|
@ -120,6 +120,8 @@ pub fn reserved_accessibility_properties() -> impl Iterator<Item = (&'static str
|
|||
"accessible-action-set-value",
|
||||
Type::Callback { return_type: None, args: vec![Type::String] },
|
||||
),
|
||||
("accessible-selectable", Type::Bool),
|
||||
("accessible-selected", Type::Bool),
|
||||
]
|
||||
.into_iter()
|
||||
}
|
||||
|
|
|
@ -112,6 +112,8 @@ export component ListItem {
|
|||
layout := HorizontalLayout {
|
||||
padding-bottom: 8px;
|
||||
accessible-role: list-item;
|
||||
accessible-selectable: true;
|
||||
accessible-selected: root.is-selected;
|
||||
|
||||
StateLayerBase {
|
||||
width: 100%;
|
||||
|
|
|
@ -74,6 +74,8 @@ export component ListItem {
|
|||
padding-left: root.padding-horizontal;
|
||||
padding-right: root.padding-horizontal;
|
||||
accessible-role: list-item;
|
||||
accessible-selectable: true;
|
||||
accessible-selected: root.is-selected;
|
||||
|
||||
i-background := Rectangle {
|
||||
background: transparent;
|
||||
|
|
|
@ -79,6 +79,8 @@ export component ListItem {
|
|||
padding-right: 16px;
|
||||
spacing: 4px;
|
||||
accessible-role: list-item;
|
||||
accessible-selectable: true;
|
||||
accessible-selected: root.is-selected;
|
||||
|
||||
i-text := Text {
|
||||
text: root.item.text;
|
||||
|
|
|
@ -146,6 +146,8 @@ export component ListItem {
|
|||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
accessible-role: list-item;
|
||||
accessible-selectable: true;
|
||||
accessible-selected: root.is-selected;
|
||||
|
||||
label := Text {
|
||||
text: root.item.text;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue