Restore more active styles
This commit is contained in:
parent
743949753a
commit
d5fc831321
2 changed files with 5 additions and 4 deletions
|
@ -133,12 +133,13 @@ impl<S: 'static + Send + Sync + Clone> CollabPanel<S> {
|
||||||
theme: &Theme,
|
theme: &Theme,
|
||||||
) -> impl Element<ViewState = S> {
|
) -> impl Element<ViewState = S> {
|
||||||
div()
|
div()
|
||||||
|
.id("list_item")
|
||||||
.h_7()
|
.h_7()
|
||||||
.px_2()
|
.px_2()
|
||||||
.flex()
|
.flex()
|
||||||
.items_center()
|
.items_center()
|
||||||
.hover(|style| style.bg(theme.lowest.variant.hovered.background))
|
.hover(|style| style.bg(theme.lowest.variant.hovered.background))
|
||||||
// .active(|style| style.fill(theme.lowest.variant.pressed.background))
|
.active(|style| style.bg(theme.lowest.variant.pressed.background))
|
||||||
.child(
|
.child(
|
||||||
div()
|
div()
|
||||||
.flex()
|
.flex()
|
||||||
|
|
|
@ -84,15 +84,15 @@ impl<S: 'static + Send + Sync + Clone> Palette<S> {
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.flatten(),
|
.flatten(),
|
||||||
)
|
)
|
||||||
.children(self.items.iter().map(|item| {
|
.children(self.items.iter().enumerate().map(|(index, item)| {
|
||||||
h_stack()
|
h_stack()
|
||||||
|
.id(index)
|
||||||
.justify_between()
|
.justify_between()
|
||||||
.px_2()
|
.px_2()
|
||||||
.py_0p5()
|
.py_0p5()
|
||||||
.rounded_lg()
|
.rounded_lg()
|
||||||
.hover(|style| style.bg(theme.lowest.base.hovered.background))
|
.hover(|style| style.bg(theme.lowest.base.hovered.background))
|
||||||
// .active()
|
.active(|style| style.bg(theme.lowest.base.pressed.background))
|
||||||
// .fill(theme.lowest.base.pressed.background)
|
|
||||||
.child(item.clone())
|
.child(item.clone())
|
||||||
})),
|
})),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue