mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Add the accessible-read-only
property
This commit is contained in:
parent
e5c27d57ca
commit
cc91de2d38
18 changed files with 60 additions and 1 deletions
|
@ -214,6 +214,7 @@ pub fn reserved_accessibility_properties() -> impl Iterator<Item = (&'static str
|
|||
("accessible-item-selected", Type::Bool),
|
||||
("accessible-item-index", Type::Int32),
|
||||
("accessible-item-count", Type::Int32),
|
||||
("accessible-read-only", Type::Bool),
|
||||
]
|
||||
.into_iter()
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ export component LineEdit {
|
|||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-read-only: root.read-only;
|
||||
accessible-action-set-value(v) => { text = v; edited(v); }
|
||||
|
||||
public function set-selection-offsets(start: int, end: int) {
|
||||
|
|
|
@ -29,6 +29,7 @@ export component TextEdit {
|
|||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-read-only: root.read-only;
|
||||
|
||||
public function set-selection-offsets(start: int, end: int) {
|
||||
base.set-selection-offsets(start, end);
|
||||
|
|
|
@ -23,6 +23,7 @@ export component LineEdit {
|
|||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-read-only: root.read-only;
|
||||
accessible-action-set-value(v) => {
|
||||
text = v;
|
||||
edited(v);
|
||||
|
|
|
@ -85,6 +85,7 @@ export component TextEdit {
|
|||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-read-only: root.read-only;
|
||||
|
||||
public function set-selection-offsets(start: int, end: int) {
|
||||
text-input.set-selection-offsets(start, end);
|
||||
|
|
|
@ -22,6 +22,7 @@ export component LineEdit {
|
|||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-read-only: root.read-only;
|
||||
accessible-action-set-value(v) => { text = v; edited(v); }
|
||||
|
||||
public function set-selection-offsets(start: int, end: int) {
|
||||
|
|
|
@ -29,6 +29,7 @@ export component TextEdit {
|
|||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-read-only: root.read-only;
|
||||
|
||||
public function set-selection-offsets(start: int, end: int) {
|
||||
base.set-selection-offsets(start, end);
|
||||
|
|
|
@ -23,6 +23,7 @@ export component LineEdit {
|
|||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-read-only: root.read-only;
|
||||
accessible-action-set-value(v) => { text = v; edited(v); }
|
||||
|
||||
public function set-selection-offsets(start: int, end: int) {
|
||||
|
|
|
@ -29,6 +29,7 @@ export component TextEdit {
|
|||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-read-only: root.read-only;
|
||||
|
||||
public function set-selection-offsets(start: int, end: int) {
|
||||
base.set-selection-offsets(start, end);
|
||||
|
|
|
@ -21,6 +21,7 @@ export component LineEdit {
|
|||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-read-only: root.read-only;
|
||||
accessible-action-set-value(v) => { text = v; edited(v); }
|
||||
|
||||
public function set-selection-offsets(start: int, end: int) {
|
||||
|
|
|
@ -28,6 +28,7 @@ export component TextEdit {
|
|||
accessible-enabled: root.enabled;
|
||||
accessible-value <=> text;
|
||||
accessible-placeholder-text: text == "" ? placeholder-text : "";
|
||||
accessible-read-only: root.read-only;
|
||||
|
||||
public function set-selection-offsets(start: int, end: int) {
|
||||
base.set-selection-offsets(start, end);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue