Skip to content

Commit

Permalink
Fix invoke_accessible_increment/decrement_action docs
Browse files Browse the repository at this point in the history
They invoke a callback, not change a property.
  • Loading branch information
tronical committed May 27, 2024
1 parent 1040946 commit fbc441c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/backends/testing/search_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,16 @@ impl ElementHandle {
.unwrap_or_default()
}

/// Increase value of the element's `accessible-action-increment` property. Note that you can only set this
/// property if it is declared in your Slint code.
/// Invokes the element's `accessible-action-increment` callback, if declared. On widgets such as spinboxes, this
/// typically increments the value.
pub fn invoke_accessible_increment_action(&self) {
if let Some(item) = self.0.upgrade() {
item.accessible_action(&AccessibilityAction::Increment)
}
}

/// Decrease value of the element's `accessible-action-decrease` property. Note that you can only set this
/// property if it is declared in your Slint code.
/// Invokes the element's `accessible-action-decrement` callback, if declared. On widgets such as spinboxes, this
/// typically decrements the value.
pub fn invoke_accessible_decrement_action(&self) {
if let Some(item) = self.0.upgrade() {
item.accessible_action(&AccessibilityAction::Decrement)
Expand Down

0 comments on commit fbc441c

Please sign in to comment.