summaryrefslogtreecommitdiffstats
path: root/style/src/theme.rs
diff options
context:
space:
mode:
authorLibravatar MG_REX <49415741+ThisIsRex@users.noreply.github.com>2022-05-04 18:56:27 +0300
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-10-05 19:07:02 +0200
commitd95c216b2db76dd812b960d39499dc5e03a81ffc (patch)
tree0ec579b7ec603bfbb2b37495b4fa22d51516b9c7 /style/src/theme.rs
parent2278bade55b2bcd530c8c9a30a22d5f800921e55 (diff)
downloadiced-d95c216b2db76dd812b960d39499dc5e03a81ffc.tar.gz
iced-d95c216b2db76dd812b960d39499dc5e03a81ffc.tar.bz2
iced-d95c216b2db76dd812b960d39499dc5e03a81ffc.zip
Add `is_selected` argument in `radio::StyleSheet`
Diffstat (limited to 'style/src/theme.rs')
-rw-r--r--style/src/theme.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/style/src/theme.rs b/style/src/theme.rs
index 9e9abfa0..ea538c3a 100644
--- a/style/src/theme.rs
+++ b/style/src/theme.rs
@@ -415,7 +415,11 @@ impl pick_list::StyleSheet for Theme {
impl radio::StyleSheet for Theme {
type Style = ();
- fn active(&self, _style: Self::Style) -> radio::Appearance {
+ fn active(
+ &self,
+ _style: Self::Style,
+ _is_selected: bool,
+ ) -> radio::Appearance {
let palette = self.extended_palette();
radio::Appearance {
@@ -427,8 +431,12 @@ impl radio::StyleSheet for Theme {
}
}
- fn hovered(&self, style: Self::Style) -> radio::Appearance {
- let active = self.active(style);
+ fn hovered(
+ &self,
+ style: Self::Style,
+ is_selected: bool,
+ ) -> radio::Appearance {
+ let active = self.active(style, is_selected);
let palette = self.extended_palette();
radio::Appearance {