Re-enable hover styles

Marshall Bowers created

Change summary

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(-)

Detailed changes

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(

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(

crates/ui2/src/components/breadcrumb.rs 🔗

@@ -43,8 +43,8 @@ impl<S: 'static + Send + Sync + Clone> Breadcrumb<S> {
             .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)

crates/ui2/src/components/collab_panel.rs 🔗

@@ -137,8 +137,8 @@ impl<S: 'static + Send + Sync + Clone> CollabPanel<S> {
             .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(

crates/ui2/src/components/icon_button.rs 🔗

@@ -62,8 +62,8 @@ impl<S: 'static + Send + Sync> IconButton<S> {
             .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))

crates/ui2/src/components/palette.rs 🔗

@@ -89,8 +89,8 @@ impl<S: 'static + Send + Sync + Clone> Palette<S> {
                                     .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())

crates/ui2/src/elements/input.rs 🔗

@@ -90,8 +90,8 @@ impl<S: 'static + Send + Sync> Input<S> {
             .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)

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,
 };