Use an IconButton
for the tab close button
This commit is contained in:
parent
33245d119e
commit
1361b61708
2 changed files with 8 additions and 21 deletions
|
@ -159,7 +159,6 @@ impl Icon {
|
|||
pub struct IconElement {
|
||||
icon: Icon,
|
||||
color: IconColor,
|
||||
hover_color: Option<IconColor>,
|
||||
size: IconSize,
|
||||
}
|
||||
|
||||
|
@ -168,7 +167,6 @@ impl IconElement {
|
|||
Self {
|
||||
icon,
|
||||
color: IconColor::default(),
|
||||
hover_color: None,
|
||||
size: IconSize::default(),
|
||||
}
|
||||
}
|
||||
|
@ -178,11 +176,6 @@ impl IconElement {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn hover_color(mut self, hover_color: impl Into<Option<IconColor>>) -> Self {
|
||||
self.hover_color = hover_color.into();
|
||||
self
|
||||
}
|
||||
|
||||
pub fn size(mut self, size: IconSize) -> Self {
|
||||
self.size = size;
|
||||
self
|
||||
|
@ -199,9 +192,6 @@ impl IconElement {
|
|||
.flex_none()
|
||||
.path(self.icon.path())
|
||||
.text_color(self.color.color(cx))
|
||||
.when_some(self.hover_color, |this, hover_color| {
|
||||
this.hover(|style| style.text_color(hover_color.color(cx)))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue