feat(segmented_button): pressed state style

This commit is contained in:
Michael Aaron Murphy 2025-08-13 12:13:05 +02:00
parent 4f423349a2
commit 5434dc95d5
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
3 changed files with 37 additions and 23 deletions

View file

@ -63,6 +63,7 @@ impl StyleSheet for Theme {
text_color: container.component.on.into(),
},
hover: hover(cosmic, &active, 0.2),
pressed: hover(cosmic, &active, 0.15),
active,
..Default::default()
}
@ -117,6 +118,7 @@ impl StyleSheet for Theme {
text_color: container.component.on.into(),
},
hover: hover(cosmic, &active, 0.2),
pressed: hover(cosmic, &active, 0.15),
active,
..Default::default()
}
@ -169,6 +171,7 @@ mod horizontal {
text_color: container.component.on.into(),
},
hover: super::hover(cosmic, &active, 0.3),
pressed: super::hover(cosmic, &active, 0.25),
active,
..Default::default()
}
@ -262,6 +265,7 @@ mod vertical {
..active
},
hover: super::hover(cosmic, &active, 0.3),
pressed: super::hover(cosmic, &active, 0.25),
active,
..Default::default()
}