Finish main merge

Mikayla created

Change summary

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

Detailed changes

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

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<Vec<BreadcrumbText>> {
+    fn breadcrumbs(&self, _theme: &ThemeVariant, _cx: &AppContext) -> Option<Vec<BreadcrumbText>> {
         None
     }
 
@@ -259,7 +259,7 @@ pub trait ItemHandle: 'static + Send {
     ) -> gpui2::Subscription;
     fn to_searchable_item_handle(&self, cx: &AppContext) -> Option<Box<dyn SearchableItemHandle>>;
     fn breadcrumb_location(&self, cx: &AppContext) -> ToolbarItemLocation;
-    fn breadcrumbs(&self, theme: &Theme, cx: &AppContext) -> Option<Vec<BreadcrumbText>>;
+    fn breadcrumbs(&self, theme: &ThemeVariant, cx: &AppContext) -> Option<Vec<BreadcrumbText>>;
     fn serialized_item_kind(&self) -> Option<&'static str>;
     fn show_toolbar(&self, cx: &AppContext) -> bool;
     fn pixel_position_of_cursor(&self, cx: &AppContext) -> Option<Point<Pixels>>;
@@ -585,7 +585,7 @@ impl<T: Item> ItemHandle for View<T> {
         self.read(cx).breadcrumb_location()
     }
 
-    fn breadcrumbs(&self, theme: &Theme, cx: &AppContext) -> Option<Vec<BreadcrumbText>> {
+    fn breadcrumbs(&self, theme: &ThemeVariant, cx: &AppContext) -> Option<Vec<BreadcrumbText>> {
         self.read(cx).breadcrumbs(theme, cx)
     }
 

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<Project>,
-        theme: &Theme,
+        theme: &ThemeVariant,
         follower_states: &HashMap<View<Pane>, FollowerState>,
         active_call: Option<&Model<ActiveCall>>,
         active_pane: &View<Pane>,
@@ -187,7 +187,7 @@ impl Member {
         &self,
         project: &Model<Project>,
         basis: usize,
-        theme: &Theme,
+        theme: &ThemeVariant,
         follower_states: &HashMap<View<Pane>, FollowerState>,
         active_call: Option<&Model<ActiveCall>>,
         active_pane: &View<Pane>,
@@ -510,7 +510,7 @@ impl PaneAxis {
         &self,
         project: &Model<Project>,
         basis: usize,
-        theme: &Theme,
+        theme: &ThemeVariant,
         follower_states: &HashMap<View<Pane>, FollowerState>,
         active_call: Option<&Model<ActiveCall>>,
         active_pane: &View<Pane>,