feat: add focusable property to all widget

This commit is contained in:
Byson94
2025-10-23 19:43:14 +05:30
parent f52164da87
commit 140643d4ec
2 changed files with 5 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- `spacing` property to eventbox.
- `space_evenly` property to eventbox.
- An advanced widget named `flowbox`.
- `focusable` property to all widget.
### Fixed

View File

@@ -2367,6 +2367,10 @@ pub(super) fn resolve_rhai_widget_attrs(gtk_widget: &gtk4::Widget, props: &Map)
gtk_widget.set_can_target(can_target);
}
if let Ok(focusable) = get_bool_prop(&props, "focusable", Some(true)) {
gtk_widget.set_focusable(focusable);
}
Ok(())
}