From b53e9b84ecfe693dd4dbacc737f03bf8bd4827a0 Mon Sep 17 00:00:00 2001 From: 0x192 Date: Thu, 7 Oct 2021 20:12:22 +0200 Subject: [PATCH] Small UI improvement --- src/core/theme.rs | 2 +- src/core/utils.rs | 4 ++-- src/gui/style.rs | 21 ++++++++++++--------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/core/theme.rs b/src/core/theme.rs index 09e3359..de397a3 100644 --- a/src/core/theme.rs +++ b/src/core/theme.rs @@ -111,7 +111,7 @@ impl Theme { primary: hex_to_color("#bd94f9").unwrap(), secondary: hex_to_color("#49eb7a").unwrap(), surface: hex_to_color("#f4f8f3").unwrap(), - error: hex_to_color("#cc0000").unwrap(), + error: hex_to_color("#E63E6D").unwrap(), }, }, } diff --git a/src/core/utils.rs b/src/core/utils.rs index 8f7b4f7..7b3b118 100644 --- a/src/core/utils.rs +++ b/src/core/utils.rs @@ -112,7 +112,7 @@ pub fn import_selection(packages: &mut Vec, selection: &mut Selectio pub fn icon(unicode: char) -> Text { Text::new(&unicode.to_string()) .font(ICONS) - .width(Length::Units(20)) + .width(Length::Units(17)) .horizontal_alignment(alignment::Horizontal::Center) - .size(20) + .size(17) } diff --git a/src/gui/style.rs b/src/gui/style.rs index a24ff2f..7384eb5 100644 --- a/src/gui/style.rs +++ b/src/gui/style.rs @@ -148,12 +148,12 @@ impl button::StyleSheet for PackageButton { }, Self::Uninstall(palette) => button::Style { background: Some(Background::Color(Color { - a: 0.05, - ..palette.normal.error + a: 0.01, + ..palette.bright.error })), text_color: Color { a: 0.50, - ..palette.normal.error + ..palette.bright.error }, ..self.active() }, @@ -167,6 +167,9 @@ impl button::StyleSheet for PackageRow { button::Style { background: Some(Background::Color(self.0.base.foreground)), text_color: self.0.bright.surface, + border_radius: 5.0, + border_width: 0.0, + border_color: self.0.base.background, ..button::Style::default() } } @@ -195,7 +198,7 @@ impl container::StyleSheet for Description { container::Style { background: Some(Background::Color(self.0.base.foreground)), text_color: Some(self.0.bright.surface), - border_radius: 0.0, + border_radius: 5.0, border_width: 0.0, border_color: self.0.base.background, ..container::Style::default() @@ -285,9 +288,9 @@ impl checkbox::StyleSheet for SelectionCheckBox { Self::Enabled(palette) => checkbox::Style { background: Background::Color(palette.base.background), checkmark_color: palette.bright.primary, - border_radius: 2.0, - border_width: 0.0, - border_color: palette.normal.primary, + border_radius: 5.0, + border_width: 1.0, + border_color: palette.base.background, }, Self::Disabled(palette) => checkbox::Style { background: Background::Color(palette.base.foreground), @@ -304,9 +307,9 @@ impl checkbox::StyleSheet for SelectionCheckBox { Self::Enabled(palette) => checkbox::Style { background: Background::Color(palette.base.foreground), checkmark_color: palette.bright.primary, - border_radius: 2.0, + border_radius: 5.0, border_width: 2.0, - border_color: palette.bright.primary, + border_color: palette.normal.primary, }, Self::Disabled(_) => checkbox::Style {