Extend border radius on relevant widgets

This commit is contained in:
Casper Storm 2023-05-23 12:26:16 +02:00
parent 8300d86c24
commit 1c86defab5
19 changed files with 111 additions and 99 deletions

View file

@ -157,7 +157,7 @@ impl button::StyleSheet for Theme {
let palette = self.extended_palette();
let appearance = button::Appearance {
border_radius: 2.0,
border_radius: 2.0.into(),
..button::Appearance::default()
};
@ -346,7 +346,7 @@ fn checkbox_appearance(
base.color
}),
icon_color,
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 1.0,
border_color: accent.color,
text_color: None,
@ -383,7 +383,7 @@ impl container::StyleSheet for Theme {
container::Appearance {
text_color: None,
background: Some(palette.background.weak.color.into()),
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 0.0,
border_color: Color::TRANSPARENT,
}
@ -422,7 +422,7 @@ impl slider::StyleSheet for Theme {
let handle = slider::Handle {
shape: slider::HandleShape::Rectangle {
width: 8,
border_radius: 4.0,
border_radius: 4.0.into(),
},
color: Color::WHITE,
border_color: Color::WHITE,
@ -507,7 +507,7 @@ impl menu::StyleSheet for Theme {
text_color: palette.background.weak.text,
background: palette.background.weak.color.into(),
border_width: 1.0,
border_radius: 0.0,
border_radius: 0.0.into(),
border_color: palette.background.strong.color,
selected_text_color: palette.primary.strong.text,
selected_background: palette.primary.strong.color.into(),
@ -553,7 +553,7 @@ impl pick_list::StyleSheet for Theme {
background: palette.background.weak.color.into(),
placeholder_color: palette.background.strong.color,
handle_color: palette.background.weak.text,
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 1.0,
border_color: palette.background.strong.color,
}
@ -572,7 +572,7 @@ impl pick_list::StyleSheet for Theme {
background: palette.background.weak.color.into(),
placeholder_color: palette.background.strong.color,
handle_color: palette.background.weak.text,
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 1.0,
border_color: palette.primary.strong.color,
}
@ -729,7 +729,7 @@ impl pane_grid::StyleSheet for Theme {
}),
border_width: 2.0,
border_color: palette.primary.strong.color,
border_radius: 0.0,
border_radius: 0.0.into(),
}
}
PaneGrid::Custom(custom) => custom.hovered_region(self),
@ -800,7 +800,7 @@ impl progress_bar::StyleSheet for Theme {
let from_palette = |bar: Color| progress_bar::Appearance {
background: palette.background.strong.color.into(),
bar: bar.into(),
border_radius: 2.0,
border_radius: 2.0.into(),
};
match style {
@ -846,7 +846,7 @@ impl rule::StyleSheet for Theme {
Rule::Default => rule::Appearance {
color: palette.background.strong.color,
width: 1,
radius: 0.0,
radius: 0.0.into(),
fill_mode: rule::FillMode::Full,
},
Rule::Custom(custom) => custom.appearance(self),
@ -929,12 +929,12 @@ impl scrollable::StyleSheet for Theme {
scrollable::Scrollbar {
background: Some(palette.background.weak.color.into()),
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 0.0,
border_color: Color::TRANSPARENT,
scroller: scrollable::Scroller {
color: palette.background.strong.color,
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 0.0,
border_color: Color::TRANSPARENT,
},
@ -956,12 +956,12 @@ impl scrollable::StyleSheet for Theme {
scrollable::Scrollbar {
background: Some(palette.background.weak.color.into()),
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 0.0,
border_color: Color::TRANSPARENT,
scroller: scrollable::Scroller {
color: palette.primary.strong.color,
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 0.0,
border_color: Color::TRANSPARENT,
},
@ -1063,7 +1063,7 @@ impl text_input::StyleSheet for Theme {
text_input::Appearance {
background: palette.background.base.color.into(),
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 1.0,
border_color: palette.background.strong.color,
icon_color: palette.background.weak.text,
@ -1079,7 +1079,7 @@ impl text_input::StyleSheet for Theme {
text_input::Appearance {
background: palette.background.base.color.into(),
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 1.0,
border_color: palette.background.base.text,
icon_color: palette.background.weak.text,
@ -1095,7 +1095,7 @@ impl text_input::StyleSheet for Theme {
text_input::Appearance {
background: palette.background.base.color.into(),
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 1.0,
border_color: palette.primary.strong.color,
icon_color: palette.background.weak.text,
@ -1141,7 +1141,7 @@ impl text_input::StyleSheet for Theme {
text_input::Appearance {
background: palette.background.weak.color.into(),
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 1.0,
border_color: palette.background.strong.color,
icon_color: palette.background.strong.color,