diff options
| author | Joe Carstairs <me@joeac.net> | 2026-02-07 11:52:08 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-02-07 12:02:27 +0000 |
| commit | 1664e741ad35ce52a01788c34029f0b2ea477e32 (patch) | |
| tree | dd6bd7c83a7e834c75815a786d67b5188cdd1f48 /schist_desktop_gui/src/gui/components/bucket_navigation_entry | |
| parent | 179878d12ba10ac242da2044f4c6dfe4d4829e59 (diff) | |
task-001: can navigate file screen options with keyboard
Diffstat (limited to 'schist_desktop_gui/src/gui/components/bucket_navigation_entry')
| -rw-r--r-- | schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_group_name.rs | 9 | ||||
| -rw-r--r-- | schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_name_and_balance.rs | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_group_name.rs b/schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_group_name.rs index cbc9521..98902ee 100644 --- a/schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_group_name.rs +++ b/schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_group_name.rs @@ -3,12 +3,16 @@ use iced::{ Element, Length, }; -use crate::gui::components::{navigation, BucketNavigationEntry}; +use crate::{ + gui::components::{navigation, BucketNavigationEntry}, + impl_focusable, +}; #[derive(Clone, Debug, PartialEq)] pub struct BucketGroupName { pub group: String, pub is_open: bool, + pub is_focused: bool, } impl BucketGroupName { @@ -16,6 +20,7 @@ impl BucketGroupName { Self { group: group.to_string(), is_open, + is_focused: false, } } } @@ -34,3 +39,5 @@ impl<'a> From<&'a BucketGroupName> for Element<'a, navigation::Message<BucketNav row![text(text_content).width(Length::Fill),].into() } } + +impl_focusable!(BucketGroupName); diff --git a/schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_name_and_balance.rs b/schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_name_and_balance.rs index 7abca57..874540f 100644 --- a/schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_name_and_balance.rs +++ b/schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_name_and_balance.rs @@ -4,17 +4,22 @@ use iced::{ }; use schist_models::Bucket; -use crate::gui::components::{navigation, BucketNavigationEntry}; +use crate::{ + gui::components::{navigation, BucketNavigationEntry}, + impl_focusable, +}; #[derive(Clone, Debug, PartialEq)] pub struct BucketNameAndBalance { pub bucket: Bucket, + is_focused: bool, } impl BucketNameAndBalance { pub fn new(bucket: &Bucket) -> Self { Self { bucket: bucket.clone(), + is_focused: false, } } } @@ -40,3 +45,5 @@ impl<'a> From<&'a BucketNameAndBalance> .into() } } + +impl_focusable!(BucketNameAndBalance); |
