diff --git a/src/theme/mod.rs b/src/theme/mod.rs index 452b985a..7f7afaa1 100644 --- a/src/theme/mod.rs +++ b/src/theme/mod.rs @@ -253,23 +253,22 @@ impl button::StyleSheet for Theme { } } - // TODO add back - // fn focused(&self, style: &Self::Style) -> button::Appearance { - // if let Button::Custom { hover, .. } = style { - // return hover(self); - // } + fn focused(&self, style: &Self::Style) -> button::Appearance { + if let Button::Custom { hover, .. } = style { + return hover(self); + } - // let active = self.active(style); - // let component = style.cosmic(self); - // button::Appearance { - // background: match style { - // Button::Link => None, - // Button::LinkActive => Some(Background::Color(component.divider.into())), - // _ => Some(Background::Color(component.hover.into())), - // }, - // ..active - // } - // } + let active = self.active(style); + let component = style.cosmic(self); + button::Appearance { + background: match style { + Button::Link => None, + Button::LinkActive => Some(Background::Color(component.divider.into())), + _ => Some(Background::Color(component.hover.into())), + }, + ..active + } + } } /* diff --git a/src/widget/icon.rs b/src/widget/icon.rs index f85b38d0..bcbd4b77 100644 --- a/src/widget/icon.rs +++ b/src/widget/icon.rs @@ -71,7 +71,7 @@ impl<'a> IconSource<'a> { let handle = if let Some(path) = icon { svg::Handle::from_path(path) } else { - eprintln!("svg icon '{:?}' size {} not found", self, size); + eprintln!("svg icon '{self:?}' size {size} not found"); svg::Handle::from_memory(Vec::new()) };