Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Re-enable hover styles

Marshall Bowers8f7f38536d3a
diff --git a/crates/storybook2/src/collab_panel.rs b/crates/storybook2/src/collab_panel.rs
index 0628f8ee913..a4996a6ea1b 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 4875c61a576..fc08378c4a5 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 98046b42643..c0760ef8021 100644
--- a/crates/ui2/src/components/breadcrumb.rs
+++ b/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)
diff --git a/crates/ui2/src/components/collab_panel.rs b/crates/ui2/src/components/collab_panel.rs
index 1baa082f1de..5a0098939aa 100644
--- a/crates/ui2/src/components/collab_panel.rs
+++ b/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(
diff --git a/crates/ui2/src/components/icon_button.rs b/crates/ui2/src/components/icon_button.rs
index ed8be40e70e..0ece22b6514 100644
--- a/crates/ui2/src/components/icon_button.rs
+++ b/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))
diff --git a/crates/ui2/src/components/palette.rs b/crates/ui2/src/components/palette.rs
index 7f023b1aef2..76e6e16f716 100644
--- a/crates/ui2/src/components/palette.rs
+++ b/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())
diff --git a/crates/ui2/src/elements/input.rs b/crates/ui2/src/elements/input.rs
index afc653de73e..4cc32ccc0d6 100644
--- a/crates/ui2/src/elements/input.rs
+++ b/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)
diff --git a/crates/ui2/src/prelude.rs b/crates/ui2/src/prelude.rs
index 204bdb834e2..cca62bb58c3 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,
};