mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Add the accessible-enabled
property
This commit is contained in:
parent
129936a7d7
commit
2de3b9d455
51 changed files with 80 additions and 1 deletions
|
@ -26,6 +26,7 @@ export component Button {
|
|||
forward-focus: i-focus-scope;
|
||||
|
||||
accessible-role: button;
|
||||
accessible-enabled: root.enabled;
|
||||
accessible-checkable: root.checkable;
|
||||
accessible-checked: root.checked;
|
||||
accessible-label: root.text;
|
||||
|
|
|
@ -16,6 +16,7 @@ export component CheckBox {
|
|||
|
||||
min-height: max(18px, layout.min-height);
|
||||
accessible-checkable: true;
|
||||
accessible-enabled: root.enabled;
|
||||
accessible-label: root.text;
|
||||
accessible-checked <=> root.checked;
|
||||
accessible-role: checkbox;
|
||||
|
|
|
@ -25,6 +25,7 @@ export component ComboBox {
|
|||
forward-focus: base;
|
||||
|
||||
accessible-role: combobox;
|
||||
accessible-enabled: root.enabled;
|
||||
|
||||
states [
|
||||
disabled when !root.enabled : {
|
||||
|
|
|
@ -17,6 +17,7 @@ export component LineEdit {
|
|||
callback accepted <=> base.accepted;
|
||||
callback edited <=> base.edited;
|
||||
accessible-role: text-input;
|
||||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-action-set-value(v) => { text = v; edited(v); }
|
||||
|
|
|
@ -20,6 +20,7 @@ export component Slider {
|
|||
vertical-stretch: base.vertical ? 1 : 0;
|
||||
horizontal-stretch: base.vertical ? 0 : 1;
|
||||
accessible-role: slider;
|
||||
accessible-enabled: root.enabled;
|
||||
accessible-value: root.value;
|
||||
accessible-value-minimum: root.minimum;
|
||||
accessible-value-maximum: root.maximum;
|
||||
|
|
|
@ -50,6 +50,7 @@ export component SpinBox {
|
|||
forward-focus: base;
|
||||
|
||||
accessible-role: spinbox;
|
||||
accessible-enabled: root.enabled;
|
||||
accessible-value: root.value;
|
||||
accessible-value-minimum: root.minimum;
|
||||
accessible-value-maximum: root.maximum;
|
||||
|
|
|
@ -27,6 +27,7 @@ export component Switch {
|
|||
min-height: max(20px, layout.min-height);
|
||||
vertical-stretch: 0;
|
||||
horizontal-stretch: 0;
|
||||
accessible-enabled: root.enabled;
|
||||
accessible-label: root.text;
|
||||
accessible-checkable: true;
|
||||
accessible-checked <=> root.checked;
|
||||
|
|
|
@ -48,6 +48,7 @@ export component TabImpl inherits Rectangle {
|
|||
horizontal-stretch: 0;
|
||||
vertical-stretch: 0;
|
||||
accessible-role: tab;
|
||||
accessible-enabled: root.enabled;
|
||||
accessible-label: root.title;
|
||||
|
||||
Rectangle {
|
||||
|
|
|
@ -23,6 +23,7 @@ export component TextEdit {
|
|||
|
||||
callback edited <=> base.edited;
|
||||
accessible-role: AccessibleRole.text-input;
|
||||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue