Finish main merge

This commit is contained in:
Mikayla 2023-11-01 11:52:14 -07:00
parent e82d8eb5b8
commit 6f38eb3252
No known key found for this signature in database
3 changed files with 10 additions and 10 deletions

View file

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

View file

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

View file

@ -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>,