From 140643d4ecea2a19e5dc2ee0c3dc3f17f57e50f4 Mon Sep 17 00:00:00 2001 From: Byson94 Date: Thu, 23 Oct 2025 19:43:14 +0530 Subject: [PATCH] feat: add focusable property to all widget --- CHANGELOG.md | 1 + crates/ewwii/src/widgets/widget_definitions.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1c56f3..7dc5281 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/crates/ewwii/src/widgets/widget_definitions.rs b/crates/ewwii/src/widgets/widget_definitions.rs index ba93089..e68aeee 100644 --- a/crates/ewwii/src/widgets/widget_definitions.rs +++ b/crates/ewwii/src/widgets/widget_definitions.rs @@ -2367,6 +2367,10 @@ pub(super) fn resolve_rhai_widget_attrs(gtk_widget: >k4::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(()) }