From 7e6d4ab22196d2c077cbc1835631f1d2926a81d3 Mon Sep 17 00:00:00 2001 From: PixelDots Date: Tue, 21 May 2024 16:40:22 -0500 Subject: [PATCH] Fix window title Fix icon sizes Optimize icons --- .../apps/me.pixeldoted.CosmicColorPicker.svg | 165 +----------------- .../apps/me.pixeldoted.CosmicColorPicker.svg | 165 +----------------- .../apps/me.pixeldoted.CosmicColorPicker.svg | 165 +----------------- .../apps/me.pixeldoted.CosmicColorPicker.svg | 165 +----------------- .../apps/me.pixeldoted.CosmicColorPicker.svg | 165 +----------------- .../apps/me.pixeldoted.CosmicColorPicker.svg | 165 +----------------- .../apps/me.pixeldoted.CosmicColorPicker.svg | 165 +----------------- src/app.rs | 7 +- 8 files changed, 11 insertions(+), 1151 deletions(-) diff --git a/res/icons/hicolor/128x128/apps/me.pixeldoted.CosmicColorPicker.svg b/res/icons/hicolor/128x128/apps/me.pixeldoted.CosmicColorPicker.svg index fb097c2..692fb79 100644 --- a/res/icons/hicolor/128x128/apps/me.pixeldoted.CosmicColorPicker.svg +++ b/res/icons/hicolor/128x128/apps/me.pixeldoted.CosmicColorPicker.svg @@ -1,164 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/res/icons/hicolor/16x16/apps/me.pixeldoted.CosmicColorPicker.svg b/res/icons/hicolor/16x16/apps/me.pixeldoted.CosmicColorPicker.svg index fb097c2..e000f5d 100644 --- a/res/icons/hicolor/16x16/apps/me.pixeldoted.CosmicColorPicker.svg +++ b/res/icons/hicolor/16x16/apps/me.pixeldoted.CosmicColorPicker.svg @@ -1,164 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/res/icons/hicolor/24x24/apps/me.pixeldoted.CosmicColorPicker.svg b/res/icons/hicolor/24x24/apps/me.pixeldoted.CosmicColorPicker.svg index fb097c2..881b0b1 100644 --- a/res/icons/hicolor/24x24/apps/me.pixeldoted.CosmicColorPicker.svg +++ b/res/icons/hicolor/24x24/apps/me.pixeldoted.CosmicColorPicker.svg @@ -1,164 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/res/icons/hicolor/256x256/apps/me.pixeldoted.CosmicColorPicker.svg b/res/icons/hicolor/256x256/apps/me.pixeldoted.CosmicColorPicker.svg index fb097c2..aee5961 100644 --- a/res/icons/hicolor/256x256/apps/me.pixeldoted.CosmicColorPicker.svg +++ b/res/icons/hicolor/256x256/apps/me.pixeldoted.CosmicColorPicker.svg @@ -1,164 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/res/icons/hicolor/32x32/apps/me.pixeldoted.CosmicColorPicker.svg b/res/icons/hicolor/32x32/apps/me.pixeldoted.CosmicColorPicker.svg index fb097c2..5da3945 100644 --- a/res/icons/hicolor/32x32/apps/me.pixeldoted.CosmicColorPicker.svg +++ b/res/icons/hicolor/32x32/apps/me.pixeldoted.CosmicColorPicker.svg @@ -1,164 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/res/icons/hicolor/48x48/apps/me.pixeldoted.CosmicColorPicker.svg b/res/icons/hicolor/48x48/apps/me.pixeldoted.CosmicColorPicker.svg index fb097c2..a287bc5 100644 --- a/res/icons/hicolor/48x48/apps/me.pixeldoted.CosmicColorPicker.svg +++ b/res/icons/hicolor/48x48/apps/me.pixeldoted.CosmicColorPicker.svg @@ -1,164 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/res/icons/hicolor/64x64/apps/me.pixeldoted.CosmicColorPicker.svg b/res/icons/hicolor/64x64/apps/me.pixeldoted.CosmicColorPicker.svg index fb097c2..daa6d1f 100644 --- a/res/icons/hicolor/64x64/apps/me.pixeldoted.CosmicColorPicker.svg +++ b/res/icons/hicolor/64x64/apps/me.pixeldoted.CosmicColorPicker.svg @@ -1,164 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/src/app.rs b/src/app.rs index 96d0820..9f15228 100644 --- a/src/app.rs +++ b/src/app.rs @@ -13,7 +13,7 @@ use cosmic::iced::{event, keyboard::Event as KeyEvent, Color, Event, Subscriptio use cosmic::iced_widget::scrollable::{Direction, Properties}; use cosmic::widget::menu::{self, action::MenuAction, MenuBar}; use cosmic::widget::segmented_button::Entity; -use cosmic::{theme, widget, Application, Element}; +use cosmic::{theme, widget, Application, ApplicationExt, Element}; use log::info; pub struct ColorPicker { @@ -92,7 +92,7 @@ impl Application for ColorPicker { } fn init(core: Core, _flags: Self::Flags) -> (Self, Command) { - let example = ColorPicker { + let mut app = ColorPicker { spaces: vec![ColorSpace::default()], last_edited: 0, @@ -105,7 +105,8 @@ impl Application for ColorPicker { core, }; - (example, Command::none()) + let command = app.set_window_title(fl!("app-title")); + (app, command) } fn update(&mut self, message: Self::Message) -> Command {