From 6f38eb325251b5753c7dad9994326ee24bacd50f Mon Sep 17 00:00:00 2001 From: Mikayla Date: Wed, 1 Nov 2023 11:52:14 -0700 Subject: [PATCH] Finish main merge --- crates/storybook2/src/storybook2.rs | 4 ++-- crates/workspace2/src/item.rs | 8 ++++---- crates/workspace2/src/pane_group.rs | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/storybook2/src/storybook2.rs b/crates/storybook2/src/storybook2.rs index 3b5722732bfbe90246730d6872151b67129fee82..0ac84de3929faba9b033bbb4bbf3cc7fb29cc258 100644 --- a/crates/storybook2/src/storybook2.rs +++ b/crates/storybook2/src/storybook2.rs @@ -82,8 +82,8 @@ fn main() { ..Default::default() }, move |cx| { - let theme_settings = ThemeSettings::get_global(cx); - cx.set_rem_size(theme_settings.ui_font_size); + let ui_font_size = ThemeSettings::get_global(cx).ui_font_size; + cx.set_rem_size(ui_font_size); cx.build_view(|cx| StoryWrapper::new(selector.story(cx))) }, diff --git a/crates/workspace2/src/item.rs b/crates/workspace2/src/item.rs index d839f39203438ea7c36380c56222c1d9ca1ccac0..313a54d7561e88a15b4c3ca9b445886a8439546f 100644 --- a/crates/workspace2/src/item.rs +++ b/crates/workspace2/src/item.rs @@ -21,6 +21,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use settings2::Settings; use smallvec::SmallVec; +use theme2::ThemeVariant; use std::{ any::{Any, TypeId}, ops::Range, @@ -31,7 +32,6 @@ use std::{ }, time::Duration, }; -use theme2::Theme; #[derive(Deserialize)] pub struct ItemSettings { @@ -178,7 +178,7 @@ pub trait Item: Render + EventEmitter + Send { ToolbarItemLocation::Hidden } - fn breadcrumbs(&self, _theme: &Theme, _cx: &AppContext) -> Option> { + fn breadcrumbs(&self, _theme: &ThemeVariant, _cx: &AppContext) -> Option> { None } @@ -259,7 +259,7 @@ pub trait ItemHandle: 'static + Send { ) -> gpui2::Subscription; fn to_searchable_item_handle(&self, cx: &AppContext) -> Option>; fn breadcrumb_location(&self, cx: &AppContext) -> ToolbarItemLocation; - fn breadcrumbs(&self, theme: &Theme, cx: &AppContext) -> Option>; + fn breadcrumbs(&self, theme: &ThemeVariant, cx: &AppContext) -> Option>; fn serialized_item_kind(&self) -> Option<&'static str>; fn show_toolbar(&self, cx: &AppContext) -> bool; fn pixel_position_of_cursor(&self, cx: &AppContext) -> Option>; @@ -585,7 +585,7 @@ impl ItemHandle for View { self.read(cx).breadcrumb_location() } - fn breadcrumbs(&self, theme: &Theme, cx: &AppContext) -> Option> { + fn breadcrumbs(&self, theme: &ThemeVariant, cx: &AppContext) -> Option> { self.read(cx).breadcrumbs(theme, cx) } diff --git a/crates/workspace2/src/pane_group.rs b/crates/workspace2/src/pane_group.rs index d537a1d2fbeba3245da186b9ba970a074273967e..f4fdb6ba162eae2b0d3ff856e2a62c8906cd853d 100644 --- a/crates/workspace2/src/pane_group.rs +++ b/crates/workspace2/src/pane_group.rs @@ -11,7 +11,7 @@ use parking_lot::Mutex; use project2::Project; use serde::Deserialize; use std::sync::Arc; -use theme2::Theme; +use theme2::ThemeVariant; const HANDLE_HITBOX_SIZE: f32 = 4.0; const HORIZONTAL_MIN_SIZE: f32 = 80.; @@ -124,7 +124,7 @@ impl PaneGroup { pub(crate) fn render( &self, project: &Model, - theme: &Theme, + theme: &ThemeVariant, follower_states: &HashMap, FollowerState>, active_call: Option<&Model>, active_pane: &View, @@ -187,7 +187,7 @@ impl Member { &self, project: &Model, basis: usize, - theme: &Theme, + theme: &ThemeVariant, follower_states: &HashMap, FollowerState>, active_call: Option<&Model>, active_pane: &View, @@ -510,7 +510,7 @@ impl PaneAxis { &self, project: &Model, basis: usize, - theme: &Theme, + theme: &ThemeVariant, follower_states: &HashMap, FollowerState>, active_call: Option<&Model>, active_pane: &View,