Allow Checkbox style to change based on its state
This commit is contained in:
parent
08faaaf623
commit
cae4463e83
3 changed files with 20 additions and 13 deletions
|
|
@ -21,9 +21,9 @@ impl checkbox::Renderer for Renderer {
|
|||
style_sheet: &Self::Style,
|
||||
) -> Self::Output {
|
||||
let style = if is_mouse_over {
|
||||
style_sheet.hovered()
|
||||
style_sheet.hovered(is_checked)
|
||||
} else {
|
||||
style_sheet.active()
|
||||
style_sheet.active(is_checked)
|
||||
};
|
||||
|
||||
let checkbox = Primitive::Quad {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue