Define theme/ui text style settings in theme crate
This commit is contained in:
parent
5c729c0e56
commit
67a25126d4
86 changed files with 530 additions and 637 deletions
|
@ -4,7 +4,6 @@ use gpui::{
|
|||
platform::{CursorStyle, MouseButton},
|
||||
Entity, Subscription, View, ViewContext, ViewHandle, WeakViewHandle,
|
||||
};
|
||||
use settings::Settings;
|
||||
use std::sync::Arc;
|
||||
use workspace::{item::ItemHandle, StatusItemView, Workspace};
|
||||
|
||||
|
@ -55,7 +54,7 @@ impl View for ActiveBufferLanguage {
|
|||
};
|
||||
|
||||
MouseEventHandler::<Self, Self>::new(0, cx, |state, cx| {
|
||||
let theme = &cx.global::<Settings>().theme.workspace.status_bar;
|
||||
let theme = &theme::current(cx).workspace.status_bar;
|
||||
let style = theme.active_language.style_for(state, false);
|
||||
Label::new(active_language_text, style.text.clone())
|
||||
.contained()
|
||||
|
|
|
@ -8,7 +8,6 @@ use gpui::{actions, elements::*, AppContext, ModelHandle, MouseState, ViewContex
|
|||
use language::{Buffer, LanguageRegistry};
|
||||
use picker::{Picker, PickerDelegate, PickerEvent};
|
||||
use project::Project;
|
||||
use settings::Settings;
|
||||
use std::sync::Arc;
|
||||
use util::ResultExt;
|
||||
use workspace::Workspace;
|
||||
|
@ -179,8 +178,7 @@ impl PickerDelegate for LanguageSelectorDelegate {
|
|||
selected: bool,
|
||||
cx: &AppContext,
|
||||
) -> AnyElement<Picker<Self>> {
|
||||
let settings = cx.global::<Settings>();
|
||||
let theme = &settings.theme;
|
||||
let theme = theme::current(cx);
|
||||
let mat = &self.matches[ix];
|
||||
let style = theme.picker.item.style_for(mouse_state, selected);
|
||||
let buffer_language_name = self.buffer.read(cx).language().map(|l| l.name());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue