Add the accessible-expandable property

This commit is contained in:
Arnold Loubriat 2024-12-22 16:15:37 +01:00 committed by Simon Hausmann
parent e442965889
commit 53fd7b12e4
12 changed files with 42 additions and 0 deletions

View file

@ -647,6 +647,17 @@ impl ElementHandle {
})
}
/// Returns the value of the `accessible-expandable` property, if present
pub fn accessible_expandable(&self) -> Option<bool> {
if self.element_index != 0 {
return None;
}
self.item
.upgrade()
.and_then(|item| item.accessible_string_property(AccessibleStringProperty::Expandable))
.and_then(|item| item.parse().ok())
}
/// Returns the size of the element in logical pixels. This corresponds to the value of the `width` and
/// `height` properties in Slint code. Returns a zero size if the element is not valid.
pub fn size(&self) -> i_slint_core::api::LogicalSize {