aboutsummaryrefslogtreecommitdiff
path: root/src/components/footer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/footer.rs')
-rw-r--r--src/components/footer.rs18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/components/footer.rs b/src/components/footer.rs
index 2576163..1c6581d 100644
--- a/src/components/footer.rs
+++ b/src/components/footer.rs
@@ -1,14 +1,12 @@
use gtk::prelude::*;
-use relm4::prelude::*;
use relm4::actions::ActionablePlus;
+use relm4::prelude::*;
-use crate::tr;
use crate::constants;
+use crate::tr;
-use crate::{
- ZoomInAction, ZoomOutAction, actions::Action
-};
-use crate::icon_names::shipped::{ ZOOM_IN_REGULAR, ZOOM_OUT_REGULAR };
+use crate::icon_names::shipped::{ZOOM_IN_REGULAR, ZOOM_OUT_REGULAR};
+use crate::{ZoomInAction, ZoomOutAction, actions::Action};
// Model and Input Messages
@@ -22,7 +20,7 @@ pub struct FooterInit {
#[derive(Debug, Clone)]
pub enum FooterAction {
- SetZoom(f64)
+ SetZoom(f64),
}
#[relm4::component(pub)]
@@ -81,9 +79,7 @@ impl SimpleComponent for Footer {
root: Self::Root,
sender: ComponentSender<Self>,
) -> ComponentParts<Self> {
- let model = Footer {
- zoom: init.zoom
- };
+ let model = Footer { zoom: init.zoom };
let widgets = view_output!();
ComponentParts { model, widgets }
@@ -91,7 +87,7 @@ impl SimpleComponent for Footer {
fn update(&mut self, message: Self::Input, _sender: ComponentSender<Self>) {
match message {
- FooterAction::SetZoom(zoom) => self.zoom = zoom
+ FooterAction::SetZoom(zoom) => self.zoom = zoom,
}
}
}