From 1664e741ad35ce52a01788c34029f0b2ea477e32 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Sat, 7 Feb 2026 11:52:08 +0000 Subject: task-001: can navigate file screen options with keyboard --- .../src/gui/components/bucket_navigation_entry.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'schist_desktop_gui/src/gui/components/bucket_navigation_entry.rs') diff --git a/schist_desktop_gui/src/gui/components/bucket_navigation_entry.rs b/schist_desktop_gui/src/gui/components/bucket_navigation_entry.rs index be11178..69665a3 100644 --- a/schist_desktop_gui/src/gui/components/bucket_navigation_entry.rs +++ b/schist_desktop_gui/src/gui/components/bucket_navigation_entry.rs @@ -4,7 +4,7 @@ use iced::Element; use itertools::Either; use schist_models::Bucket; -use crate::gui::components::navigation; +use crate::{gui::components::navigation, traits::Focusable}; mod bucket_group_name; mod bucket_name_and_balance; @@ -66,3 +66,19 @@ impl<'a> From<&'a BucketNavigationEntry> bucket_navigation_entry.0.as_ref().either_into() } } + +impl Focusable for BucketNavigationEntry { + fn focus(&mut self) { + match self.0.as_mut() { + Either::Left(group) => group.focus(), + Either::Right(bucket) => bucket.focus(), + }; + } + + fn unfocus(&mut self) { + match self.0.as_mut() { + Either::Left(group) => group.unfocus(), + Either::Right(bucket) => bucket.unfocus(), + }; + } +} -- cgit v1.2.3