Small UI improvement

This commit is contained in:
0x192 2021-10-07 20:12:22 +02:00
commit b53e9b84ec
No known key found for this signature in database
GPG key ID: 34D27465928A0A1D
3 changed files with 15 additions and 12 deletions

View file

@ -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(),
},
},
}

View file

@ -112,7 +112,7 @@ pub fn import_selection(packages: &mut Vec<PackageRow>, 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)
}

View file

@ -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 {