Fix minor styling inconsistencies in some widgets
This commit is contained in:
parent
35df95e988
commit
468014a184
27 changed files with 48 additions and 35 deletions
|
|
@ -556,20 +556,23 @@ pub fn primary(theme: &Theme, status: Status) -> Style {
|
|||
|
||||
match status {
|
||||
Status::Active { is_checked } => styled(
|
||||
palette.background.strongest.color,
|
||||
palette.background.strong.color,
|
||||
palette.background.base,
|
||||
palette.primary.base.text,
|
||||
palette.primary.base,
|
||||
is_checked,
|
||||
),
|
||||
Status::Hovered { is_checked } => styled(
|
||||
palette.background.strongest.color,
|
||||
palette.background.strong.color,
|
||||
palette.background.weak,
|
||||
palette.primary.base.text,
|
||||
palette.primary.strong,
|
||||
is_checked,
|
||||
),
|
||||
Status::Disabled { is_checked } => styled(
|
||||
palette.background.weak.color,
|
||||
palette.background.weak,
|
||||
palette.primary.base.text,
|
||||
palette.background.strong,
|
||||
is_checked,
|
||||
),
|
||||
|
|
@ -582,20 +585,23 @@ pub fn secondary(theme: &Theme, status: Status) -> Style {
|
|||
|
||||
match status {
|
||||
Status::Active { is_checked } => styled(
|
||||
palette.background.strongest.color,
|
||||
palette.background.strong.color,
|
||||
palette.background.base,
|
||||
palette.background.base.text,
|
||||
palette.background.strong,
|
||||
is_checked,
|
||||
),
|
||||
Status::Hovered { is_checked } => styled(
|
||||
palette.background.strongest.color,
|
||||
palette.background.strong.color,
|
||||
palette.background.weak,
|
||||
palette.background.base.text,
|
||||
palette.background.strong,
|
||||
is_checked,
|
||||
),
|
||||
Status::Disabled { is_checked } => styled(
|
||||
palette.background.weak.color,
|
||||
palette.background.weak,
|
||||
palette.background.base.text,
|
||||
palette.background.weak,
|
||||
is_checked,
|
||||
),
|
||||
|
|
@ -610,18 +616,21 @@ pub fn success(theme: &Theme, status: Status) -> Style {
|
|||
Status::Active { is_checked } => styled(
|
||||
palette.background.weak.color,
|
||||
palette.background.base,
|
||||
palette.success.base.text,
|
||||
palette.success.base,
|
||||
is_checked,
|
||||
),
|
||||
Status::Hovered { is_checked } => styled(
|
||||
palette.background.strongest.color,
|
||||
palette.background.strong.color,
|
||||
palette.background.weak,
|
||||
palette.success.base.text,
|
||||
palette.success.strong,
|
||||
is_checked,
|
||||
),
|
||||
Status::Disabled { is_checked } => styled(
|
||||
palette.background.weak.color,
|
||||
palette.background.weak,
|
||||
palette.success.base.text,
|
||||
palette.success.weak,
|
||||
is_checked,
|
||||
),
|
||||
|
|
@ -634,20 +643,23 @@ pub fn danger(theme: &Theme, status: Status) -> Style {
|
|||
|
||||
match status {
|
||||
Status::Active { is_checked } => styled(
|
||||
palette.background.strongest.color,
|
||||
palette.background.strong.color,
|
||||
palette.background.base,
|
||||
palette.danger.base.text,
|
||||
palette.danger.base,
|
||||
is_checked,
|
||||
),
|
||||
Status::Hovered { is_checked } => styled(
|
||||
palette.background.strongest.color,
|
||||
palette.background.strong.color,
|
||||
palette.background.weak,
|
||||
palette.danger.base.text,
|
||||
palette.danger.strong,
|
||||
is_checked,
|
||||
),
|
||||
Status::Disabled { is_checked } => styled(
|
||||
palette.background.weak.color,
|
||||
palette.background.weak,
|
||||
palette.danger.base.text,
|
||||
palette.danger.weak,
|
||||
is_checked,
|
||||
),
|
||||
|
|
@ -657,6 +669,7 @@ pub fn danger(theme: &Theme, status: Status) -> Style {
|
|||
fn styled(
|
||||
border_color: Color,
|
||||
base: palette::Pair,
|
||||
icon_color: Color,
|
||||
accent: palette::Pair,
|
||||
is_checked: bool,
|
||||
) -> Style {
|
||||
|
|
@ -668,7 +681,7 @@ fn styled(
|
|||
|
||||
Style {
|
||||
background: Background::Color(background.color),
|
||||
icon_color: background.text,
|
||||
icon_color,
|
||||
border: Border {
|
||||
radius: 2.0.into(),
|
||||
width: 1.0,
|
||||
|
|
|
|||
|
|
@ -899,7 +899,7 @@ pub fn default(theme: &Theme, status: Status) -> Style {
|
|||
let active = Style {
|
||||
text_color: palette.background.weak.text,
|
||||
background: palette.background.weak.color.into(),
|
||||
placeholder_color: palette.background.strong.color,
|
||||
placeholder_color: palette.secondary.base.color,
|
||||
handle_color: palette.background.weak.text,
|
||||
border: Border {
|
||||
radius: 2.0.into(),
|
||||
|
|
|
|||
|
|
@ -2069,7 +2069,7 @@ pub fn default(theme: &Theme, status: Status) -> Style {
|
|||
background: Some(palette.background.weak.color.into()),
|
||||
border: border::rounded(2),
|
||||
scroller: Scroller {
|
||||
color: palette.background.strong.color,
|
||||
color: palette.background.strongest.color,
|
||||
border: border::rounded(2),
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@ pub fn default(theme: &Theme, status: Status) -> Style {
|
|||
if is_toggled {
|
||||
palette.primary.base.color
|
||||
} else {
|
||||
palette.background.strongest.color
|
||||
palette.background.strong.color
|
||||
}
|
||||
}
|
||||
Status::Disabled => palette.background.weak.color,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue