chore: Rebase Iced

This commit is contained in:
Michael Aaron Murphy 2022-12-19 17:03:13 +01:00
parent 50b8131e21
commit 6e30394270
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
4 changed files with 11 additions and 15 deletions

View file

@ -164,7 +164,7 @@ impl button::StyleSheet for Theme {
if let Button::Custom {active, ..} = style {
return active(self);
}
let cosmic = style.cosmic(self);
button::Appearance {
@ -182,7 +182,7 @@ impl button::StyleSheet for Theme {
if let Button::Custom {hover, ..} = style {
return hover(self);
}
let active = self.active(&style);
let cosmic = style.cosmic(self);
@ -728,15 +728,15 @@ impl Hash for Svg {
impl svg::StyleSheet for Theme {
type Style = Svg;
fn appearance(&self, style: Self::Style) -> svg::Appearance {
fn appearance(&self, style: &Self::Style) -> svg::Appearance {
match style {
Svg::Default => svg::Appearance::default(),
Svg::Custom(appearance) => appearance(self),
Svg::Symbolic => svg::Appearance {
fill: Some(self.extended_palette().background.base.text),
color: Some(self.extended_palette().background.base.text),
},
Svg::SymbolicActive => svg::Appearance {
fill: Some(self.cosmic().accent.base.into()),
color: Some(self.cosmic().accent.base.into()),
},
}
}

View file

@ -66,8 +66,9 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> {
let mut widget = widget::row(packed)
.height(Length::Units(50))
.padding(10)
.apply(widget::event_container)
.center_y();
.apply(widget::container)
.center_y()
.apply(widget::mouse_listener);
if let Some(message) = self.on_drag.clone() {
widget = widget.on_press(message);