From da5b8d271005ed59b33f4e5be0510a9af2c1dc03 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 1 May 2026 07:16:27 -0500 Subject: [PATCH] [fix]: some more icons --- res/circle-plus.svg | 1 + res/search.svg | 1 + src/main.rs | 20 +++++++++++++++----- 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 res/circle-plus.svg create mode 100644 res/search.svg diff --git a/res/circle-plus.svg b/res/circle-plus.svg new file mode 100644 index 0000000..73af212 --- /dev/null +++ b/res/circle-plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/res/search.svg b/res/search.svg new file mode 100644 index 0000000..73ef891 --- /dev/null +++ b/res/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 484a387..803d06f 100755 --- a/src/main.rs +++ b/src/main.rs @@ -447,7 +447,13 @@ impl cosmic::Application for App { vec![ menu::Item::Button( "New", - Some(icon::from_name("document-new").symbolic(true).into()), + Some(if cfg!(target_os = "linux") { + icon::from_name("document-new").symbolic(true).into() + } else { + icon::from_path("./res/circle-plus.svg".into()) + .symbolic(true) + .into() + }), MenuAction::New, ), menu::Item::Button( @@ -520,8 +526,12 @@ impl cosmic::Application for App { tooltip( button::custom( row!( - Container::new(icon::from_name("search").scale(5).symbolic(true)) - .center_y(Length::Fill), + Container::new( + icon::from_path("./res/search.svg".into()) + .symbolic(true) + .icon() + ) + .center_y(Length::Fill), text::body("Search") ) .spacing(5), @@ -538,11 +548,11 @@ impl cosmic::Application for App { Container::new(if self.editor_mode.is_some() { icon::from_path("./res/presentation-analytics.svg".into()) .symbolic(true) - .apply(icon::icon) + .icon() } else { icon::from_path("./res/edit.svg".into()) .symbolic(true) - .apply(icon::icon) + .icon() }) .center_y(Length::Fill), text::body(if self.editor_mode.is_some() {