diff --git a/src/app/mod.rs b/src/app/mod.rs index 6ed4a4c..9f684b2 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -14,8 +14,8 @@ use cosmic::app::{context_drawer, Core}; use cosmic::cosmic_config::{self, CosmicConfigEntry}; use cosmic::iced::keyboard::{self, key::Named, Key, Modifiers}; use cosmic::iced::window; -use cosmic::iced::{Length, Subscription}; -use cosmic::widget::{button, horizontal_space, icon, nav_bar}; +use cosmic::iced::Subscription; +use cosmic::widget::nav_bar; use cosmic::{Action, Element, Task}; pub use message::AppMessage; @@ -145,19 +145,19 @@ impl cosmic::Application for Noctua { Task::none() } - fn header_start(&self) -> Vec> { + fn header_start(&self) -> Vec> { view::header::header_start(&self.model) } - fn header_end(&self) -> Vec> { + fn header_end(&self) -> Vec> { view::header::header_end(&self.model) } - fn view(&self) -> Element { + fn view(&self) -> Element<'_, Self::Message> { view::view(&self.model) } - fn context_drawer(&self) -> Option> { + fn context_drawer(&self) -> Option> { if !self.core.window.show_context { return None; } @@ -171,7 +171,7 @@ impl cosmic::Application for Noctua { Some(&self.nav) } - fn footer(&self) -> Option> { + fn footer(&self) -> Option> { Some(view::footer::view(&self.model)) } diff --git a/src/app/view/header.rs b/src/app/view/header.rs index 4a22a60..3082992 100644 --- a/src/app/view/header.rs +++ b/src/app/view/header.rs @@ -12,7 +12,7 @@ use crate::app::model::AppModel; use crate::app::ContextPage; /// Build the left side of the header bar. -pub fn header_start(model: &AppModel) -> Vec> { +pub fn header_start(model: &AppModel) -> Vec> { let has_doc = model.document.is_some(); vec![ @@ -51,7 +51,7 @@ pub fn header_start(model: &AppModel) -> Vec> { } /// Build the right side of the header bar. -pub fn header_end(model: &AppModel) -> Vec> { +pub fn header_end(_model: &AppModel) -> Vec> { vec![button::icon(icon::from_name("dialog-information-symbolic")) .on_press(AppMessage::ToggleContextPage(ContextPage::Properties)) .into()] diff --git a/src/app/view/image_viewer.rs b/src/app/view/image_viewer.rs index 1a69519..ab34e7b 100644 --- a/src/app/view/image_viewer.rs +++ b/src/app/view/image_viewer.rs @@ -1,14 +1,14 @@ //! Zoom and pan on an image. //! Forked from cosmic::iced to support external state control. -use cosmic::iced::advanced::widget::{self, tree::{self, Tree}, Widget}; +use cosmic::iced::advanced::widget::{tree::{self, Tree}, Widget}; use cosmic::iced::advanced::{ Clipboard, Layout, Shell, layout, renderer, image as img_renderer, }; use cosmic::iced::event::{self, Event}; use cosmic::iced::mouse; -use cosmic::iced::widget::image::{self, FilterMethod, Handle}; +use cosmic::iced::widget::image::{self, FilterMethod}; use cosmic::iced::{ ContentFit, Element, Length, Pixels, Point, Radians, Rectangle, Size, Vector,