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
|
@ -10,8 +10,7 @@ use gpui::{
|
|||
WeakViewHandle,
|
||||
};
|
||||
use project::Project;
|
||||
use settings::Settings;
|
||||
use theme::{ColorScheme, Layer, Style, StyleSet};
|
||||
use theme::{ColorScheme, Layer, Style, StyleSet, ThemeSettings};
|
||||
use workspace::{item::Item, register_deserializable_item, Pane, Workspace};
|
||||
|
||||
actions!(theme, [DeployThemeTestbench]);
|
||||
|
@ -220,7 +219,7 @@ impl ThemeTestbench {
|
|||
}
|
||||
|
||||
fn render_label(text: String, style: &Style, cx: &mut ViewContext<Self>) -> Label {
|
||||
let settings = cx.global::<Settings>();
|
||||
let settings = settings::get_setting::<ThemeSettings>(None, cx);
|
||||
let font_cache = cx.font_cache();
|
||||
let family_id = settings.buffer_font_family;
|
||||
let font_size = settings::font_size_for_setting(settings.buffer_font_size, cx);
|
||||
|
@ -252,7 +251,7 @@ impl View for ThemeTestbench {
|
|||
}
|
||||
|
||||
fn render(&mut self, cx: &mut gpui::ViewContext<Self>) -> AnyElement<Self> {
|
||||
let color_scheme = &cx.global::<Settings>().theme.clone().color_scheme;
|
||||
let color_scheme = &theme::current(cx).clone().color_scheme;
|
||||
|
||||
Flex::row()
|
||||
.with_child(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue