From d37785c214fe11777ea2412f97611f666b0aaf6f Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 6 Oct 2023 15:46:02 -0400 Subject: [PATCH 1/2] Fix icon paths --- crates/storybook2/src/collab_panel.rs | 4 ++-- crates/storybook2/src/workspace.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/storybook2/src/collab_panel.rs b/crates/storybook2/src/collab_panel.rs index 7af421f1b49ae5e5a0d303ac4f4ac41bf83a9b96..8117bca4b37bba611661dac0bc26bc4ddca88c4e 100644 --- a/crates/storybook2/src/collab_panel.rs +++ b/crates/storybook2/src/collab_panel.rs @@ -131,9 +131,9 @@ impl CollabPanel { div().flex().h_full().gap_1().items_center().child( svg() .path(if expanded { - "icons/radix/caret-down.svg" + "icons/caret_down.svg" } else { - "icons/radix/caret-up.svg" + "icons/caret_up.svg" }) .w_3p5() .h_3p5() diff --git a/crates/storybook2/src/workspace.rs b/crates/storybook2/src/workspace.rs index 99841322914d07c74bcefe2e4c8085e9baeedcc3..7af49f4b0f7c6838a212a1c0ecab5948d646e721 100644 --- a/crates/storybook2/src/workspace.rs +++ b/crates/storybook2/src/workspace.rs @@ -218,7 +218,7 @@ impl Titlebar { // .fill(theme.lowest.base.pressed.background) .child( svg() - .path("icons/microphone.svg") + .path("icons/mic.svg") .size_3p5() .fill(theme.lowest.base.default.foreground), ), @@ -238,7 +238,7 @@ impl Titlebar { // .fill(theme.lowest.base.pressed.background) .child( svg() - .path("icons/radix/speaker-loud.svg") + .path("icons/speaker-loud.svg") .size_3p5() .fill(theme.lowest.base.default.foreground), ), @@ -258,7 +258,7 @@ impl Titlebar { // .fill(theme.lowest.base.pressed.background) .child( svg() - .path("icons/radix/desktop.svg") + .path("icons/desktop.svg") .size_3p5() .fill(theme.lowest.base.default.foreground), ), @@ -290,7 +290,7 @@ impl Titlebar { ) .child( svg() - .path("icons/caret_down_8.svg") + .path("icons/caret_down.svg") .w_2() .h_2() .fill(theme.lowest.variant.default.foreground), From 88a6a41c7cf1868be8748a0ea324936bedbf8455 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 6 Oct 2023 15:49:53 -0400 Subject: [PATCH 2/2] Revert changes to `gpui2` crate --- crates/gpui2/src/color.rs | 9 -------- crates/gpui2/src/elements/text.rs | 14 ++---------- crates/gpui2/src/gpui2.rs | 1 - crates/gpui2/src/style.rs | 4 +--- crates/gpui2/src/view_context.rs | 37 +------------------------------ 5 files changed, 4 insertions(+), 61 deletions(-) diff --git a/crates/gpui2/src/color.rs b/crates/gpui2/src/color.rs index b128ea691c188247a1d47057b653c93c246f6571..11590f967cdba57edebf52a23fd1721cbf1fc899 100644 --- a/crates/gpui2/src/color.rs +++ b/crates/gpui2/src/color.rs @@ -160,15 +160,6 @@ pub fn black() -> Hsla { } } -pub fn white() -> Hsla { - Hsla { - h: 0., - s: 0., - l: 1., - a: 1., - } -} - impl From for Hsla { fn from(color: Rgba) -> Self { let r = color.r; diff --git a/crates/gpui2/src/elements/text.rs b/crates/gpui2/src/elements/text.rs index 3ee35eea3078475c4c13939c319b3d1819eee8dc..323b3d9f89ef19e356059a558795809e6e8b0cde 100644 --- a/crates/gpui2/src/elements/text.rs +++ b/crates/gpui2/src/elements/text.rs @@ -12,21 +12,11 @@ use parking_lot::Mutex; use std::sync::Arc; use util::arc_cow::ArcCow; -impl IntoElement for ArcCow<'static, str> { +impl>> IntoElement for S { type Element = Text; fn into_element(self) -> Self::Element { - Text { text: self } - } -} - -impl IntoElement for &'static str { - type Element = Text; - - fn into_element(self) -> Self::Element { - Text { - text: ArcCow::from(self), - } + Text { text: self.into() } } } diff --git a/crates/gpui2/src/gpui2.rs b/crates/gpui2/src/gpui2.rs index b10b6629b592c9ddbe798bace1fac119f7961fcd..355697595ff2fc6e6d610b8ce7ce4d4cd8126c4c 100644 --- a/crates/gpui2/src/gpui2.rs +++ b/crates/gpui2/src/gpui2.rs @@ -6,7 +6,6 @@ pub mod interactive; pub mod style; pub mod view; pub mod view_context; -pub mod view_handle; pub use color::*; pub use element::{AnyElement, Element, IntoElement, Layout, ParentElement}; diff --git a/crates/gpui2/src/style.rs b/crates/gpui2/src/style.rs index dc25bb4b22149b90642e91867cd725a4a9fd74ee..ecb9d79a6c47f4011550049282616ca68c6193d3 100644 --- a/crates/gpui2/src/style.rs +++ b/crates/gpui2/src/style.rs @@ -22,8 +22,6 @@ use gpui2_macros::styleable_helpers; use refineable::{Refineable, RefinementCascade}; use std::sync::Arc; -pub type StyleCascade = RefinementCascade