From 8f7f38536d3a14489157293f323b8a36a98eb0c5 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 10 Oct 2023 11:48:25 -0400 Subject: [PATCH] Re-enable hover styles --- crates/storybook2/src/collab_panel.rs | 4 +-- crates/storybook2/src/workspace.rs | 30 +++++++++++------------ crates/ui2/src/components/breadcrumb.rs | 4 +-- crates/ui2/src/components/collab_panel.rs | 4 +-- crates/ui2/src/components/icon_button.rs | 4 +-- crates/ui2/src/components/palette.rs | 4 +-- crates/ui2/src/elements/input.rs | 4 +-- crates/ui2/src/prelude.rs | 2 +- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/crates/storybook2/src/collab_panel.rs b/crates/storybook2/src/collab_panel.rs index 0628f8ee913edfb7f391af083f254acf519fe4e6..a4996a6ea1be0441bdb16cdf31c221ae0a011662 100644 --- a/crates/storybook2/src/collab_panel.rs +++ b/crates/storybook2/src/collab_panel.rs @@ -159,8 +159,8 @@ impl CollabPanel { .px_2() .flex() .items_center() - // .hover() - // .fill(theme.lowest.variant.hovered.background) + .hover() + .fill(theme.lowest.variant.hovered.background) // .active() // .fill(theme.lowest.variant.pressed.background) .child( diff --git a/crates/storybook2/src/workspace.rs b/crates/storybook2/src/workspace.rs index 4875c61a576e80267cef78740ba1e5ea552d69af..fc08378c4a5da188c73dbdbc7c4194f4373e5566 100644 --- a/crates/storybook2/src/workspace.rs +++ b/crates/storybook2/src/workspace.rs @@ -2,7 +2,7 @@ use gpui3::{ div, img, svg, view, Context, Element, ParentElement, RootView, StyleHelpers, View, ViewContext, WindowContext, }; -use ui::{prelude::*}; +use ui::prelude::*; use ui::{themed, Panel, Stack}; use crate::{ @@ -182,8 +182,8 @@ impl Titlebar { .justify_center() .px_2() .rounded_md() - // .hover() - // .fill(theme.lowest.base.hovered.background) + .hover() + .fill(theme.lowest.base.hovered.background) // .active() // .fill(theme.lowest.base.pressed.background) .child(div().text_sm().child("project")), @@ -197,8 +197,8 @@ impl Titlebar { .px_2() .rounded_md() .text_color(theme.lowest.variant.default.foreground) - // .hover() - // .fill(theme.lowest.base.hovered.background) + .hover() + .fill(theme.lowest.base.hovered.background) // .active() // .fill(theme.lowest.base.pressed.background) .child( @@ -253,8 +253,8 @@ impl Titlebar { .flex() .items_center() .justify_center() - // .hover() - // .fill(theme.lowest.base.hovered.background) + .hover() + .fill(theme.lowest.base.hovered.background) // .active() // .fill(theme.lowest.base.pressed.background) .child( @@ -273,8 +273,8 @@ impl Titlebar { .flex() .items_center() .justify_center() - // .hover() - // .fill(theme.lowest.base.hovered.background) + .hover() + .fill(theme.lowest.base.hovered.background) // .active() // .fill(theme.lowest.base.pressed.background) .child( @@ -293,8 +293,8 @@ impl Titlebar { .flex() .items_center() .justify_center() - // .hover() - // .fill(theme.lowest.base.hovered.background) + .hover() + .fill(theme.lowest.base.hovered.background) // .active() // .fill(theme.lowest.base.pressed.background) .child( @@ -318,8 +318,8 @@ impl Titlebar { .justify_center() .rounded_md() .gap_0p5() - // .hover() - // .fill(theme.lowest.base.hovered.background) + .hover() + .fill(theme.lowest.base.hovered.background) // .active() // .fill(theme.lowest.base.pressed.background) .child( @@ -435,8 +435,8 @@ mod statusbar { .gap_0p5() .px_1() .text_color(theme.lowest.variant.default.foreground) - // .hover() - // .fill(theme.lowest.base.hovered.background) + .hover() + .fill(theme.lowest.base.hovered.background) // .active() // .fill(theme.lowest.base.pressed.background) .child( diff --git a/crates/ui2/src/components/breadcrumb.rs b/crates/ui2/src/components/breadcrumb.rs index 98046b42643d9931ca4937af67ca3efb6934c610..c0760ef8021051a68836b9c098bb2484d826ad98 100644 --- a/crates/ui2/src/components/breadcrumb.rs +++ b/crates/ui2/src/components/breadcrumb.rs @@ -43,8 +43,8 @@ impl Breadcrumb { .text_sm() .text_color(theme.middle.base.default.foreground) .rounded_md() - // .hover() - // .fill(theme.highest.base.hovered.background) + .hover() + .fill(theme.highest.base.hovered.background) .child(self.path.clone().to_str().unwrap().to_string()) .child(if !self.symbols.is_empty() { self.render_separator(&theme) diff --git a/crates/ui2/src/components/collab_panel.rs b/crates/ui2/src/components/collab_panel.rs index 1baa082f1dec73e8251f02e530f60fdd871f4743..5a0098939aa690b94bbbb5a4bca7657f829af00f 100644 --- a/crates/ui2/src/components/collab_panel.rs +++ b/crates/ui2/src/components/collab_panel.rs @@ -137,8 +137,8 @@ impl CollabPanel { .px_2() .flex() .items_center() - // .hover() - // .fill(theme.lowest.variant.hovered.background) + .hover() + .fill(theme.lowest.variant.hovered.background) // .active() // .fill(theme.lowest.variant.pressed.background) .child( diff --git a/crates/ui2/src/components/icon_button.rs b/crates/ui2/src/components/icon_button.rs index ed8be40e70e59eb2ac0704606533f86d25ba737b..0ece22b65146d08a82766fb24f3b853a00260f18 100644 --- a/crates/ui2/src/components/icon_button.rs +++ b/crates/ui2/src/components/icon_button.rs @@ -62,8 +62,8 @@ impl IconButton { .items_center() .justify_center() .rounded_md() - // .hover() - // .fill(theme.highest.base.hovered.background) + .hover() + .fill(theme.highest.base.hovered.background) // .active() // .fill(theme.highest.base.pressed.background) .child(IconElement::new(self.icon).color(icon_color)) diff --git a/crates/ui2/src/components/palette.rs b/crates/ui2/src/components/palette.rs index 7f023b1aef2551deaace78c8b65fc212389d26d5..76e6e16f716c58a6ac0b0a8e67a0ed1961d3aac2 100644 --- a/crates/ui2/src/components/palette.rs +++ b/crates/ui2/src/components/palette.rs @@ -89,8 +89,8 @@ impl Palette { .px_2() .py_0p5() .rounded_lg() - // .hover() - // .fill(theme.lowest.base.hovered.background) + .hover() + .fill(theme.lowest.base.hovered.background) // .active() // .fill(theme.lowest.base.pressed.background) .child(item.clone()) diff --git a/crates/ui2/src/elements/input.rs b/crates/ui2/src/elements/input.rs index afc653de73e8b6735b1ce072bbd2f8d05d2aa0a7..4cc32ccc0d6e654819ee9f90ef734f56e8f108d0 100644 --- a/crates/ui2/src/elements/input.rs +++ b/crates/ui2/src/elements/input.rs @@ -90,8 +90,8 @@ impl Input { .border() .border_color(border_color_default) .fill(background_color_default) - // .hover() - // .border_color(border_color_hover) + .hover() + .border_color(border_color_hover) // .active() // .border_color(border_color_active) .fill(background_color_active) diff --git a/crates/ui2/src/prelude.rs b/crates/ui2/src/prelude.rs index 204bdb834e2267244eded014eedc1d7be1a7d00a..cca62bb58c3c7395290415eb654fa0146c632ed2 100644 --- a/crates/ui2/src/prelude.rs +++ b/crates/ui2/src/prelude.rs @@ -1,5 +1,5 @@ pub use gpui3::{ - div, Element, IntoAnyElement, ParentElement, ScrollState, StyleHelpers, ViewContext, + div, Element, IntoAnyElement, ParentElement, ScrollState, StyleHelpers, Styled, ViewContext, WindowContext, };