Define workspace settings in workspace crate

This commit is contained in:
Max Brunsfeld 2023-05-16 20:25:18 -07:00
parent cbd4771f10
commit 6403bb86e1
22 changed files with 253 additions and 243 deletions

View file

@ -1,6 +1,6 @@
use std::sync::Arc;
use crate::{AppState, FollowerStatesByLeader, Pane, Workspace};
use crate::{AppState, FollowerStatesByLeader, Pane, Workspace, WorkspaceSettings};
use anyhow::{anyhow, Result};
use call::{ActiveCall, ParticipantLocation};
use gpui::{
@ -11,7 +11,6 @@ use gpui::{
};
use project::Project;
use serde::Deserialize;
use settings::Settings;
use theme::Theme;
#[derive(Clone, Debug, Eq, PartialEq)]
@ -380,7 +379,8 @@ impl PaneAxis {
.with_children(self.members.iter().enumerate().map(|(ix, member)| {
let mut flex = 1.0;
if member.contains(active_pane) {
flex = cx.global::<Settings>().active_pane_magnification;
flex = settings::get_setting::<WorkspaceSettings>(None, cx)
.active_pane_magnification;
}
let mut member = member.render(