From d5fc8313211e913152163b8d0fad524c89157b84 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 19 Oct 2023 14:23:45 -0400 Subject: [PATCH] Restore more active styles --- crates/ui2/src/components/collab_panel.rs | 3 ++- crates/ui2/src/components/palette.rs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/ui2/src/components/collab_panel.rs b/crates/ui2/src/components/collab_panel.rs index 55733ed8d3..caf900d8e6 100644 --- a/crates/ui2/src/components/collab_panel.rs +++ b/crates/ui2/src/components/collab_panel.rs @@ -133,12 +133,13 @@ impl CollabPanel { theme: &Theme, ) -> impl Element { div() + .id("list_item") .h_7() .px_2() .flex() .items_center() .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( div() .flex() diff --git a/crates/ui2/src/components/palette.rs b/crates/ui2/src/components/palette.rs index 4ed99d295f..a080f85938 100644 --- a/crates/ui2/src/components/palette.rs +++ b/crates/ui2/src/components/palette.rs @@ -84,15 +84,15 @@ impl Palette { .into_iter() .flatten(), ) - .children(self.items.iter().map(|item| { + .children(self.items.iter().enumerate().map(|(index, item)| { h_stack() + .id(index) .justify_between() .px_2() .py_0p5() .rounded_lg() .hover(|style| style.bg(theme.lowest.base.hovered.background)) - // .active() - // .fill(theme.lowest.base.pressed.background) + .active(|style| style.bg(theme.lowest.base.pressed.background)) .child(item.clone()) })), ),