summaryrefslogtreecommitdiff
path: root/schist_desktop_gui/src/gui/components/bucket_navigation_entry
diff options
context:
space:
mode:
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.rs9
-rw-r--r--schist_desktop_gui/src/gui/components/bucket_navigation_entry/bucket_name_and_balance.rs9
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);