Allow a button to take a color
This commit is contained in:
parent
a7c42be9a9
commit
38888696db
5 changed files with 105 additions and 42 deletions
|
@ -1,6 +1,6 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use gpui::{rems, MouseButton};
|
||||
use gpui::MouseButton;
|
||||
|
||||
use crate::{h_stack, prelude::*};
|
||||
use crate::{ClickHandler, Icon, IconColor, IconElement};
|
||||
|
@ -88,9 +88,7 @@ impl<V: 'static> IconButton<V> {
|
|||
.id(self.id.clone())
|
||||
.justify_center()
|
||||
.rounded_md()
|
||||
// todo!("Where do these numbers come from?")
|
||||
.py(rems(0.21875))
|
||||
.px(rems(0.375))
|
||||
.p_1()
|
||||
.bg(bg_color)
|
||||
.hover(|style| style.bg(bg_hover_color))
|
||||
.active(|style| style.bg(bg_active_color))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue