mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Set accessible-item-selected
on tabs
This commit is contained in:
parent
67f6e1a737
commit
60aacc8f82
7 changed files with 9 additions and 0 deletions
|
@ -54,6 +54,7 @@ export component TabImpl inherits Rectangle {
|
|||
accessible-label: root.title;
|
||||
accessible-item-index: root.tab-index;
|
||||
accessible-item-selectable: true;
|
||||
accessible-item-selected: root.is-current;
|
||||
|
||||
Rectangle {
|
||||
y: 0;
|
||||
|
|
|
@ -52,6 +52,7 @@ export component TabImpl inherits Rectangle {
|
|||
accessible-label: root.title;
|
||||
accessible-item-index: root.tab-index;
|
||||
accessible-item-selectable: true;
|
||||
accessible-item-selected: root.is-current;
|
||||
|
||||
if (root.is-current || i-touch-area.pressed): Rectangle {
|
||||
width: 100%;
|
||||
|
|
|
@ -52,6 +52,7 @@ export component TabImpl inherits Rectangle {
|
|||
accessible-label: root.title;
|
||||
accessible-item-index: root.tab-index;
|
||||
accessible-item-selectable: true;
|
||||
accessible-item-selected: root.is-current;
|
||||
|
||||
Rectangle {
|
||||
clip: true;
|
||||
|
|
|
@ -49,6 +49,7 @@ export component TabImpl inherits Rectangle {
|
|||
accessible-label: root.title;
|
||||
accessible-item-index: root.tab-index;
|
||||
accessible-item-selectable: true;
|
||||
accessible-item-selected: root.active;
|
||||
|
||||
i-container := Rectangle {
|
||||
background: MaterialPalette.alternate-background;
|
||||
|
|
|
@ -11,6 +11,7 @@ export component TabImpl inherits NativeTab {
|
|||
accessible-label <=> root.title;
|
||||
accessible-item-index: root.tab-index;
|
||||
accessible-item-selectable: true;
|
||||
accessible-item-selected: root.tab-index == root.current;
|
||||
}
|
||||
|
||||
export component TabBarImpl inherits TabBarBase {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue