Skip to content

Commit

Permalink
chore: update button styles
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Mar 11, 2024
1 parent 5709ea7 commit 6ab3407
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/widget/cosmic_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,12 +539,12 @@ pub fn draw<'a, Renderer: cosmic::iced_core::Renderer, Theme: StyleSheet>(
style_sheet.disabled(style)
} else if is_mouse_over {
if state.is_pressed {
style_sheet.pressed(focused, style)
style_sheet.pressed(focused, false, style)
} else {
style_sheet.hovered(focused, style)
style_sheet.hovered(focused, focused, style)
}
} else {
style_sheet.active(focused, style)
style_sheet.active(focused, focused, style)
}
}
StyleType::Blend(style1, style2, percent) => {
Expand All @@ -553,19 +553,19 @@ pub fn draw<'a, Renderer: cosmic::iced_core::Renderer, Theme: StyleSheet>(
} else if is_mouse_over {
if state.is_pressed {
(
style_sheet.pressed(focused, style1),
style_sheet.pressed(focused, style2),
style_sheet.pressed(focused, false, style1),
style_sheet.pressed(focused, false, style2),
)
} else {
(
style_sheet.hovered(focused, style1),
style_sheet.hovered(focused, style2),
style_sheet.hovered(focused, false, style1),
style_sheet.hovered(focused, false, style2),
)
}
} else {
(
style_sheet.active(focused, style1),
style_sheet.active(focused, style2),
style_sheet.active(focused, false, style1),
style_sheet.active(focused, false, style2),
)
};

Expand Down

0 comments on commit 6ab3407

Please sign in to comment.