mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
theme: Split out theme_settings crate (#52569)
Self-Review Checklist: - [ ] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [ ] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [ ] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
c90bf6e6b7
commit
93e641166d
209 changed files with 1820 additions and 1577 deletions
89
Cargo.lock
generated
89
Cargo.lock
generated
|
|
@ -59,7 +59,7 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_json",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
|
|
@ -406,6 +406,7 @@ dependencies = [
|
|||
"terminal_view",
|
||||
"text",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"time",
|
||||
"time_format",
|
||||
"tree-sitter-md",
|
||||
|
|
@ -3258,6 +3259,7 @@ dependencies = [
|
|||
"telemetry_events",
|
||||
"text",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"time",
|
||||
"tokio",
|
||||
"toml 0.8.23",
|
||||
|
|
@ -3303,6 +3305,7 @@ dependencies = [
|
|||
"smallvec",
|
||||
"telemetry",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"time",
|
||||
"time_format",
|
||||
"title_bar",
|
||||
|
|
@ -3375,6 +3378,7 @@ dependencies = [
|
|||
"settings",
|
||||
"telemetry",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"time",
|
||||
"ui",
|
||||
"util",
|
||||
|
|
@ -3427,6 +3431,7 @@ dependencies = [
|
|||
"session",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"ui_input",
|
||||
"uuid",
|
||||
|
|
@ -3624,6 +3629,7 @@ dependencies = [
|
|||
"settings",
|
||||
"sum_tree",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"util",
|
||||
"workspace",
|
||||
"zlog",
|
||||
|
|
@ -4694,6 +4700,7 @@ dependencies = [
|
|||
"terminal_view",
|
||||
"text",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"tree-sitter",
|
||||
"tree-sitter-go",
|
||||
"tree-sitter-json",
|
||||
|
|
@ -4881,6 +4888,7 @@ dependencies = [
|
|||
"settings",
|
||||
"text",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"unindent",
|
||||
"util",
|
||||
|
|
@ -5397,6 +5405,7 @@ dependencies = [
|
|||
"telemetry",
|
||||
"text",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"time",
|
||||
"ui",
|
||||
"util",
|
||||
|
|
@ -5465,6 +5474,7 @@ dependencies = [
|
|||
"telemetry",
|
||||
"text",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"time",
|
||||
"tracing",
|
||||
"tree-sitter-bash",
|
||||
|
|
@ -6044,7 +6054,7 @@ dependencies = [
|
|||
"settings_content",
|
||||
"snippet_provider",
|
||||
"task",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"tokio",
|
||||
"toml 0.8.23",
|
||||
"tree-sitter",
|
||||
|
|
@ -6093,6 +6103,7 @@ dependencies = [
|
|||
"tempfile",
|
||||
"theme",
|
||||
"theme_extension",
|
||||
"theme_settings",
|
||||
"toml 0.8.23",
|
||||
"tracing",
|
||||
"url",
|
||||
|
|
@ -6131,7 +6142,7 @@ dependencies = [
|
|||
"smallvec",
|
||||
"strum 0.27.2",
|
||||
"telemetry",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"vim_mode_setting",
|
||||
|
|
@ -6288,6 +6299,7 @@ dependencies = [
|
|||
"serde_json",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
|
|
@ -7303,6 +7315,7 @@ dependencies = [
|
|||
"settings",
|
||||
"smallvec",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"time",
|
||||
"ui",
|
||||
"workspace",
|
||||
|
|
@ -7378,6 +7391,7 @@ dependencies = [
|
|||
"strum 0.27.2",
|
||||
"telemetry",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"time",
|
||||
"time_format",
|
||||
"tracing",
|
||||
|
|
@ -8729,7 +8743,7 @@ dependencies = [
|
|||
"project",
|
||||
"serde",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
|
|
@ -8845,7 +8859,7 @@ dependencies = [
|
|||
"project",
|
||||
"serde_json",
|
||||
"serde_json_lenient",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"util_macros",
|
||||
|
|
@ -9288,6 +9302,7 @@ dependencies = [
|
|||
"telemetry",
|
||||
"tempfile",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"tree-sitter-json",
|
||||
"tree-sitter-rust",
|
||||
"ui",
|
||||
|
|
@ -9398,6 +9413,7 @@ dependencies = [
|
|||
"task",
|
||||
"text",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"toml 0.8.23",
|
||||
"tracing",
|
||||
"tree-sitter",
|
||||
|
|
@ -9611,6 +9627,7 @@ dependencies = [
|
|||
"sysinfo 0.37.2",
|
||||
"telemetry",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"tree-sitter",
|
||||
"ui",
|
||||
"util",
|
||||
|
|
@ -10289,6 +10306,7 @@ dependencies = [
|
|||
"stacksafe",
|
||||
"sum_tree",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
]
|
||||
|
|
@ -10305,7 +10323,7 @@ dependencies = [
|
|||
"markdown",
|
||||
"settings",
|
||||
"tempfile",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"urlencoding",
|
||||
"util",
|
||||
|
|
@ -10665,7 +10683,7 @@ dependencies = [
|
|||
"rpc",
|
||||
"serde_json",
|
||||
"smol",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"util",
|
||||
"workspace",
|
||||
"zed_actions",
|
||||
|
|
@ -11556,6 +11574,7 @@ dependencies = [
|
|||
"settings",
|
||||
"telemetry",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"vim_mode_setting",
|
||||
|
|
@ -11661,6 +11680,7 @@ dependencies = [
|
|||
"serde_json",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
|
|
@ -11839,6 +11859,7 @@ dependencies = [
|
|||
"settings",
|
||||
"smol",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
|
|
@ -11871,6 +11892,7 @@ dependencies = [
|
|||
"smallvec",
|
||||
"smol",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
|
|
@ -12736,6 +12758,7 @@ dependencies = [
|
|||
"serde",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"ui_input",
|
||||
"workspace",
|
||||
|
|
@ -12844,6 +12867,7 @@ dependencies = [
|
|||
"settings",
|
||||
"smallvec",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"windows 0.61.3",
|
||||
"workspace",
|
||||
|
|
@ -13342,6 +13366,7 @@ dependencies = [
|
|||
"telemetry",
|
||||
"tempfile",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
|
|
@ -13368,6 +13393,7 @@ dependencies = [
|
|||
"serde_json",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"util",
|
||||
"workspace",
|
||||
]
|
||||
|
|
@ -14360,7 +14386,7 @@ dependencies = [
|
|||
"remote",
|
||||
"semver",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"ui_input",
|
||||
"workspace",
|
||||
|
|
@ -14428,6 +14454,7 @@ dependencies = [
|
|||
"sysinfo 0.37.2",
|
||||
"task",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"thiserror 2.0.17",
|
||||
"toml 0.8.23",
|
||||
"unindent",
|
||||
|
|
@ -14498,6 +14525,7 @@ dependencies = [
|
|||
"terminal",
|
||||
"terminal_view",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"tree-sitter-md",
|
||||
"tree-sitter-python",
|
||||
"tree-sitter-typescript",
|
||||
|
|
@ -14837,7 +14865,7 @@ dependencies = [
|
|||
"rope",
|
||||
"serde",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"ui_input",
|
||||
"util",
|
||||
|
|
@ -15251,6 +15279,7 @@ dependencies = [
|
|||
"serde_json",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -15474,6 +15503,7 @@ dependencies = [
|
|||
"settings",
|
||||
"smol",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"tracing",
|
||||
"ui",
|
||||
"unindent",
|
||||
|
|
@ -15818,6 +15848,7 @@ dependencies = [
|
|||
"serde_json",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"workspace",
|
||||
"zed_actions",
|
||||
|
|
@ -15866,6 +15897,7 @@ dependencies = [
|
|||
"strum 0.27.2",
|
||||
"telemetry",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"title_bar",
|
||||
"ui",
|
||||
"util",
|
||||
|
|
@ -16001,6 +16033,7 @@ dependencies = [
|
|||
"serde_json",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"vim_mode_setting",
|
||||
|
|
@ -16656,6 +16689,7 @@ dependencies = [
|
|||
"story",
|
||||
"strum 0.27.2",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"title_bar",
|
||||
"ui",
|
||||
]
|
||||
|
|
@ -17306,6 +17340,7 @@ dependencies = [
|
|||
"settings",
|
||||
"smol",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
|
|
@ -17490,6 +17525,7 @@ dependencies = [
|
|||
"sysinfo 0.37.2",
|
||||
"task",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"thiserror 2.0.17",
|
||||
"url",
|
||||
"urlencoding",
|
||||
|
|
@ -17537,6 +17573,7 @@ dependencies = [
|
|||
"task",
|
||||
"terminal",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
|
|
@ -17572,8 +17609,6 @@ dependencies = [
|
|||
"collections",
|
||||
"derive_more",
|
||||
"gpui",
|
||||
"gpui_util",
|
||||
"log",
|
||||
"palette",
|
||||
"parking_lot",
|
||||
"refineable",
|
||||
|
|
@ -17581,7 +17616,6 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_json",
|
||||
"serde_json_lenient",
|
||||
"settings",
|
||||
"strum 0.27.2",
|
||||
"thiserror 2.0.17",
|
||||
"uuid",
|
||||
|
|
@ -17596,6 +17630,7 @@ dependencies = [
|
|||
"fs",
|
||||
"gpui",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -17615,6 +17650,7 @@ dependencies = [
|
|||
"simplelog",
|
||||
"strum 0.27.2",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"vscode_theme",
|
||||
]
|
||||
|
||||
|
|
@ -17631,12 +17667,33 @@ dependencies = [
|
|||
"settings",
|
||||
"telemetry",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
"zed_actions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "theme_settings"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collections",
|
||||
"gpui",
|
||||
"gpui_util",
|
||||
"log",
|
||||
"palette",
|
||||
"refineable",
|
||||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_json_lenient",
|
||||
"settings",
|
||||
"theme",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.69"
|
||||
|
|
@ -18780,6 +18837,7 @@ dependencies = [
|
|||
"story",
|
||||
"strum 0.27.2",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui_macros",
|
||||
"windows 0.61.3",
|
||||
]
|
||||
|
|
@ -18811,7 +18869,7 @@ dependencies = [
|
|||
"markdown",
|
||||
"menu",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"workspace",
|
||||
]
|
||||
|
|
@ -19210,6 +19268,7 @@ dependencies = [
|
|||
"task",
|
||||
"text",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"tokio",
|
||||
"ui",
|
||||
"util",
|
||||
|
|
@ -20337,7 +20396,7 @@ dependencies = [
|
|||
"gpui",
|
||||
"serde",
|
||||
"settings",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"workspace",
|
||||
|
|
@ -21556,6 +21615,7 @@ dependencies = [
|
|||
"telemetry",
|
||||
"tempfile",
|
||||
"theme",
|
||||
"theme_settings",
|
||||
"ui",
|
||||
"util",
|
||||
"uuid",
|
||||
|
|
@ -22117,6 +22177,7 @@ dependencies = [
|
|||
"theme",
|
||||
"theme_extension",
|
||||
"theme_selector",
|
||||
"theme_settings",
|
||||
"time",
|
||||
"time_format",
|
||||
"title_bar",
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@ members = [
|
|||
"crates/text",
|
||||
"crates/theme",
|
||||
"crates/theme_extension",
|
||||
"crates/theme_settings",
|
||||
"crates/theme_importer",
|
||||
"crates/theme_selector",
|
||||
"crates/time_format",
|
||||
|
|
@ -445,6 +446,7 @@ terminal_view = { path = "crates/terminal_view" }
|
|||
text = { path = "crates/text" }
|
||||
theme = { path = "crates/theme" }
|
||||
theme_extension = { path = "crates/theme_extension" }
|
||||
theme_settings = { path = "crates/theme_settings" }
|
||||
theme_selector = { path = "crates/theme_selector" }
|
||||
time_format = { path = "crates/time_format" }
|
||||
platform_title_bar = { path = "crates/platform_title_bar" }
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ project.workspace = true
|
|||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
settings.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
ui.workspace = true
|
||||
util.workspace = true
|
||||
workspace.workspace = true
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use language::LanguageRegistry;
|
|||
use markdown::{CodeBlockRenderer, Markdown, MarkdownElement, MarkdownStyle};
|
||||
use project::{AgentId, Project};
|
||||
use settings::Settings;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{CopyButton, Tooltip, WithScrollbar, prelude::*};
|
||||
use util::ResultExt as _;
|
||||
use workspace::{
|
||||
|
|
|
|||
|
|
@ -7837,7 +7837,7 @@ impl Editor {
|
|||
h_flex()
|
||||
.px_0p5()
|
||||
.when(is_platform_style_mac, |parent| parent.gap_0p5())
|
||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.font(theme_settings::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.text_size(TextSize::XSmall.rems(cx))
|
||||
.child(h_flex().children(ui::render_modifiers(
|
||||
&accept_keystroke.modifiers,
|
||||
|
|
@ -8149,7 +8149,7 @@ impl Editor {
|
|||
.px_2()
|
||||
.child(
|
||||
h_flex()
|
||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.font(theme_settings::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.when(is_platform_style_mac, |parent| parent.gap_1())
|
||||
.child(h_flex().children(ui::render_modifiers(
|
||||
&accept_keystroke.modifiers,
|
||||
|
|
@ -8258,7 +8258,7 @@ impl Editor {
|
|||
.gap_2()
|
||||
.pr_1()
|
||||
.overflow_x_hidden()
|
||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.font(theme_settings::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.child(left)
|
||||
.child(preview),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7837,7 +7837,7 @@ impl Editor {
|
|||
h_flex()
|
||||
.px_0p5()
|
||||
.when(is_platform_style_mac, |parent| parent.gap_0p5())
|
||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.font(theme_settings::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.text_size(TextSize::XSmall.rems(cx))
|
||||
.child(h_flex().children(ui::render_modifiers(
|
||||
&accept_keystroke.modifiers,
|
||||
|
|
@ -8149,7 +8149,7 @@ impl Editor {
|
|||
.px_2()
|
||||
.child(
|
||||
h_flex()
|
||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.font(theme_settings::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.when(is_platform_style_mac, |parent| parent.gap_1())
|
||||
.child(h_flex().children(ui::render_modifiers(
|
||||
&accept_keystroke.modifiers,
|
||||
|
|
@ -8258,7 +8258,7 @@ impl Editor {
|
|||
.gap_2()
|
||||
.pr_1()
|
||||
.overflow_x_hidden()
|
||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.font(theme_settings::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.child(left)
|
||||
.child(preview),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ terminal.workspace = true
|
|||
terminal_view.workspace = true
|
||||
text.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
time.workspace = true
|
||||
time_format.workspace = true
|
||||
ui.workspace = true
|
||||
|
|
|
|||
|
|
@ -813,7 +813,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let store = SettingsStore::test(cx);
|
||||
cx.set_global(store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
|
||||
language_model::init_settings(cx);
|
||||
editor::init(cx);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use project::{
|
|||
use serde::Deserialize;
|
||||
use settings::{Settings as _, update_settings_file};
|
||||
use std::sync::Arc;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{
|
||||
CommonAnimationExt, KeyBinding, Modal, ModalFooter, ModalHeader, Section, Tooltip,
|
||||
WithScrollbar, prelude::*,
|
||||
|
|
|
|||
|
|
@ -1806,7 +1806,7 @@ mod tests {
|
|||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
prompt_store::init(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
language_model::init_settings(cx);
|
||||
});
|
||||
|
||||
|
|
@ -1963,7 +1963,7 @@ mod tests {
|
|||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
prompt_store::init(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
language_model::init_settings(cx);
|
||||
workspace::register_project_item::<Editor>(cx);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ use prompt_store::{PromptBuilder, PromptStore, UserPromptId};
|
|||
use rules_library::{RulesLibrary, open_rules_library};
|
||||
use search::{BufferSearchBar, buffer_search};
|
||||
use settings::{Settings, update_settings_file};
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{
|
||||
Button, Callout, CommonAnimationExt, ContextMenu, ContextMenuEntry, DocumentationSide,
|
||||
KeyBinding, PopoverMenu, PopoverMenuHandle, Tab, Tooltip, prelude::*, utils::WithRemSize,
|
||||
|
|
@ -1624,17 +1624,17 @@ impl AgentPanel {
|
|||
let agent_buffer_font_size =
|
||||
ThemeSettings::get_global(cx).agent_buffer_font_size(cx) + delta;
|
||||
|
||||
let _ = settings
|
||||
.theme
|
||||
.agent_ui_font_size
|
||||
.insert(f32::from(theme::clamp_font_size(agent_ui_font_size)).into());
|
||||
let _ = settings.theme.agent_ui_font_size.insert(
|
||||
f32::from(theme_settings::clamp_font_size(agent_ui_font_size)).into(),
|
||||
);
|
||||
let _ = settings.theme.agent_buffer_font_size.insert(
|
||||
f32::from(theme::clamp_font_size(agent_buffer_font_size)).into(),
|
||||
f32::from(theme_settings::clamp_font_size(agent_buffer_font_size))
|
||||
.into(),
|
||||
);
|
||||
});
|
||||
} else {
|
||||
theme::adjust_agent_ui_font_size(cx, |size| size + delta);
|
||||
theme::adjust_agent_buffer_font_size(cx, |size| size + delta);
|
||||
theme_settings::adjust_agent_ui_font_size(cx, |size| size + delta);
|
||||
theme_settings::adjust_agent_buffer_font_size(cx, |size| size + delta);
|
||||
}
|
||||
}
|
||||
WhichFontSize::BufferFont => {
|
||||
|
|
@ -1658,14 +1658,14 @@ impl AgentPanel {
|
|||
settings.theme.agent_buffer_font_size = None;
|
||||
});
|
||||
} else {
|
||||
theme::reset_agent_ui_font_size(cx);
|
||||
theme::reset_agent_buffer_font_size(cx);
|
||||
theme_settings::reset_agent_ui_font_size(cx);
|
||||
theme_settings::reset_agent_buffer_font_size(cx);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reset_agent_zoom(&mut self, _window: &mut Window, cx: &mut Context<Self>) {
|
||||
theme::reset_agent_ui_font_size(cx);
|
||||
theme::reset_agent_buffer_font_size(cx);
|
||||
theme_settings::reset_agent_ui_font_size(cx);
|
||||
theme_settings::reset_agent_buffer_font_size(cx);
|
||||
}
|
||||
|
||||
pub fn toggle_zoom(&mut self, _: &ToggleZoom, window: &mut Window, cx: &mut Context<Self>) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use gpui::{
|
|||
use project::agent_server_store::{AllAgentServersSettings, CustomAgentServerSettings};
|
||||
use project::{AgentRegistryStore, RegistryAgent};
|
||||
use settings::{Settings, SettingsStore, update_settings_file};
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{
|
||||
ButtonStyle, ScrollableHandle, ToggleButtonGroup, ToggleButtonGroupSize,
|
||||
ToggleButtonGroupStyle, ToggleButtonSimple, Tooltip, WithScrollbar, prelude::*,
|
||||
|
|
|
|||
|
|
@ -2577,7 +2577,7 @@ mod tests {
|
|||
|
||||
let app_state = cx.update(|cx| {
|
||||
let state = AppState::test(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
editor::init(cx);
|
||||
state
|
||||
});
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ use std::time::Instant;
|
|||
use std::{collections::BTreeMap, rc::Rc, time::Duration};
|
||||
use terminal_view::terminal_panel::TerminalPanel;
|
||||
use text::Anchor;
|
||||
use theme::AgentFontSize;
|
||||
use theme_settings::AgentFontSize;
|
||||
use ui::{
|
||||
Callout, CircularProgress, CommonAnimationExt, ContextMenu, ContextMenuEntry, CopyButton,
|
||||
DecoratedIcon, DiffStat, Disclosure, Divider, DividerColor, IconDecoration, IconDecorationKind,
|
||||
|
|
@ -4257,7 +4257,7 @@ pub(crate) mod tests {
|
|||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
SidebarThreadMetadataStore::init_global(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
editor::init(cx);
|
||||
agent_panel::init(cx);
|
||||
release_channel::init(semver::Version::new(0, 0, 0), cx);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use prompt_store::PromptStore;
|
|||
use rope::Point;
|
||||
use settings::Settings as _;
|
||||
use terminal_view::TerminalView;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{Context, TextSize};
|
||||
use workspace::Workspace;
|
||||
|
||||
|
|
@ -594,7 +594,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
release_channel::init(semver::Version::new(0, 0, 0), cx);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use std::cmp;
|
|||
use std::ops::Range;
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::utils::WithRemSize;
|
||||
use ui::{IconButtonShape, KeyBinding, PopoverMenuHandle, Tooltip, prelude::*};
|
||||
use uuid::Uuid;
|
||||
|
|
|
|||
|
|
@ -667,7 +667,7 @@ mod tests {
|
|||
let settings_store = cx.update(SettingsStore::test);
|
||||
cx.set_global(settings_store);
|
||||
cx.update(|cx| {
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
release_channel::init(Version::new(0, 0, 0), cx);
|
||||
prompt_store::init(cx);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ use prompt_store::PromptStore;
|
|||
use rope::Point;
|
||||
use settings::Settings;
|
||||
use std::{fmt::Write, ops::Range, rc::Rc, sync::Arc};
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{ContextMenu, Disclosure, ElevationIndex, prelude::*};
|
||||
use util::paths::PathStyle;
|
||||
use util::{ResultExt, debug_panic};
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ pub fn init_test(cx: &mut TestAppContext) {
|
|||
cx.update(|cx| {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
editor::init(cx);
|
||||
release_channel::init("0.0.0".parse().unwrap(), cx);
|
||||
agent_panel::init(cx);
|
||||
|
|
|
|||
|
|
@ -1030,7 +1030,11 @@ impl TextThreadEditor {
|
|||
h_flex()
|
||||
.items_center()
|
||||
.gap_1()
|
||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.font(
|
||||
theme_settings::ThemeSettings::get_global(cx)
|
||||
.buffer_font
|
||||
.clone(),
|
||||
)
|
||||
.text_size(TextSize::XSmall.rems(cx))
|
||||
.text_color(colors.text_muted)
|
||||
.child("Press")
|
||||
|
|
@ -3440,7 +3444,7 @@ mod tests {
|
|||
LanguageModelRegistry::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let settings_store = settings::SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ use gpui::{
|
|||
};
|
||||
use release_channel::ReleaseChannel;
|
||||
use std::rc::Rc;
|
||||
use theme;
|
||||
use ui::{Render, prelude::*};
|
||||
|
||||
pub struct AgentNotification {
|
||||
|
|
@ -87,7 +86,7 @@ impl AgentNotification {
|
|||
|
||||
impl Render for AgentNotification {
|
||||
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
let ui_font = theme::setup_ui_font(window, cx);
|
||||
let ui_font = theme_settings::setup_ui_font(window, cx);
|
||||
let line_height = window.line_height();
|
||||
|
||||
let bg = cx.theme().colors().elevated_surface_background;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use gpui::{
|
|||
use prompt_store::PromptId;
|
||||
use rope::Point;
|
||||
use settings::Settings;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{ButtonLike, TintColor, Tooltip, prelude::*};
|
||||
use workspace::{OpenOptions, Workspace};
|
||||
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ settings = { workspace = true, features = ["test-support"] }
|
|||
smol.workspace = true
|
||||
sqlx = { version = "0.8", features = ["sqlite"] }
|
||||
task.workspace = true
|
||||
theme_settings = { workspace = true, features = ["test-support"] }
|
||||
theme.workspace = true
|
||||
|
||||
unindent.workspace = true
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ pub async fn run_randomized_test<T: RandomizedTest>(
|
|||
let settings = cx.remove_global::<SettingsStore>();
|
||||
cx.clear_globals();
|
||||
cx.set_global(settings);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
drop(client);
|
||||
});
|
||||
executor.run_until_parked();
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ impl TestServer {
|
|||
}
|
||||
let settings = SettingsStore::test(cx);
|
||||
cx.set_global(settings);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
release_channel::init(semver::Version::new(0, 0, 0), cx);
|
||||
});
|
||||
|
||||
|
|
@ -341,7 +341,7 @@ impl TestServer {
|
|||
let os_keymap = "keymaps/default-macos.json";
|
||||
|
||||
cx.update(|cx| {
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
Project::init(&client, cx);
|
||||
client::init(&client, cx);
|
||||
editor::init(cx);
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ settings.workspace = true
|
|||
smallvec.workspace = true
|
||||
telemetry.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
time.workspace = true
|
||||
time_format.workspace = true
|
||||
title_bar.workspace = true
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ use serde::{Deserialize, Serialize};
|
|||
use settings::Settings;
|
||||
use smallvec::SmallVec;
|
||||
use std::{mem, sync::Arc};
|
||||
use theme::{ActiveTheme, ThemeSettings};
|
||||
use theme::ActiveTheme;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{
|
||||
Avatar, AvatarAvailabilityIndicator, ContextMenu, CopyButton, Facepile, HighlightedLabel,
|
||||
IconButtonShape, Indicator, ListHeader, ListItem, Tab, Tooltip, prelude::*, tooltip_container,
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ impl IncomingCallNotification {
|
|||
|
||||
impl Render for IncomingCallNotification {
|
||||
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
let ui_font = theme::setup_ui_font(window, cx);
|
||||
let ui_font = theme_settings::setup_ui_font(window, cx);
|
||||
|
||||
div().size_full().font(ui_font).child(
|
||||
CollabNotification::new(
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ impl ProjectSharedNotification {
|
|||
|
||||
impl Render for ProjectSharedNotification {
|
||||
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
let ui_font = theme::setup_ui_font(window, cx);
|
||||
let ui_font = theme_settings::setup_ui_font(window, cx);
|
||||
let no_worktree_root_names = self.worktree_root_names.is_empty();
|
||||
|
||||
let punctuation = if no_worktree_root_names { "" } else { ":" };
|
||||
|
|
|
|||
|
|
@ -49,3 +49,4 @@ menu.workspace = true
|
|||
project = { workspace = true, features = ["test-support"] }
|
||||
|
||||
workspace = { workspace = true, features = ["test-support"] }
|
||||
theme_settings.workspace = true
|
||||
|
|
@ -931,7 +931,7 @@ mod tests {
|
|||
fn init_test(cx: &mut TestAppContext) -> Arc<AppState> {
|
||||
cx.update(|cx| {
|
||||
let app_state = AppState::test(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
editor::init(cx);
|
||||
menu::init();
|
||||
go_to_line::init(cx);
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ reqwest_client.workspace = true
|
|||
session.workspace = true
|
||||
settings.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
ui.workspace = true
|
||||
ui_input.workspace = true
|
||||
uuid.workspace = true
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ fn main() {
|
|||
<dyn fs::Fs>::set_global(fs.clone(), cx);
|
||||
|
||||
settings::init(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
|
||||
let languages = Arc::new(LanguageRegistry::new(cx.background_executor().clone()));
|
||||
let client = Client::production(cx);
|
||||
|
|
@ -81,7 +81,7 @@ fn main() {
|
|||
{
|
||||
move |window, cx| {
|
||||
let app_state = app_state;
|
||||
theme::setup_ui_font(window, cx);
|
||||
theme_settings::setup_ui_font(window, cx);
|
||||
|
||||
let project = Project::local(
|
||||
app_state.client.clone(),
|
||||
|
|
|
|||
|
|
@ -68,3 +68,4 @@ settings = { workspace = true, features = ["test-support"] }
|
|||
theme = { workspace = true, features = ["test-support"] }
|
||||
util = { workspace = true, features = ["test-support"] }
|
||||
zlog.workspace = true
|
||||
theme_settings.workspace = true
|
||||
|
|
|
|||
|
|
@ -1120,7 +1120,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let store = SettingsStore::test(cx);
|
||||
cx.set_global(store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
SettingsStore::update_global(cx, |store: &mut SettingsStore, cx| {
|
||||
store.update_user_settings(cx, |settings| f(&mut settings.project.all_languages));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ tasks_ui.workspace = true
|
|||
terminal_view.workspace = true
|
||||
text.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
tree-sitter-json.workspace = true
|
||||
tree-sitter.workspace = true
|
||||
ui.workspace = true
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ use project::{
|
|||
use settings::Settings;
|
||||
use std::fmt::Write;
|
||||
use std::{ops::Range, rc::Rc, usize};
|
||||
use theme::{Theme, ThemeSettings};
|
||||
use theme::Theme;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{ContextMenu, Divider, PopoverMenu, SplitButton, Tooltip, prelude::*};
|
||||
use util::ResultExt;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ use gpui::{
|
|||
use notifications::status_toast::{StatusToast, ToastIcon};
|
||||
use project::debugger::{MemoryCell, dap_command::DataBreakpointContext, session::Session};
|
||||
use settings::Settings;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{
|
||||
ContextMenu, Divider, DropdownMenu, FluentBuilder, IntoElement, PopoverMenuHandle, Render,
|
||||
ScrollableHandle, StatefulInteractiveElement, Tooltip, WithScrollbar, prelude::*,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ pub fn init_test(cx: &mut gpui::TestAppContext) {
|
|||
let settings = SettingsStore::test(cx);
|
||||
cx.set_global(settings);
|
||||
terminal_view::init(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
command_palette_hooks::init(cx);
|
||||
editor::init(cx);
|
||||
crate::init(cx);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ serde_json.workspace = true
|
|||
settings.workspace = true
|
||||
text.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
ui.workspace = true
|
||||
util.workspace = true
|
||||
workspace.workspace = true
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use lsp::DiagnosticSeverity;
|
|||
use markdown::{Markdown, MarkdownElement};
|
||||
use settings::Settings;
|
||||
use text::{AnchorRangeExt, Point};
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{CopyButton, prelude::*};
|
||||
use util::maybe;
|
||||
|
||||
|
|
|
|||
|
|
@ -2034,7 +2034,7 @@ fn init_test(cx: &mut TestAppContext) {
|
|||
zlog::init_test();
|
||||
let settings = SettingsStore::test(cx);
|
||||
cx.set_global(settings);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
crate::init(cx);
|
||||
editor::init(cx);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ regex.workspace = true
|
|||
settings.workspace = true
|
||||
telemetry.workspace = true
|
||||
text.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
ui.workspace = true
|
||||
util.workspace = true
|
||||
workspace.workspace = true
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use project::{
|
|||
use settings::Settings as _;
|
||||
use std::rc::Rc;
|
||||
use std::{fmt::Write, sync::Arc};
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{
|
||||
ContextMenu, DropdownMenu, KeyBinding, List, ListItem, ListItemSpacing, PopoverMenuHandle,
|
||||
Tooltip, prelude::*,
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ telemetry.workspace = true
|
|||
text.workspace = true
|
||||
time.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
tree-sitter-c = { workspace = true, optional = true }
|
||||
tree-sitter-html = { workspace = true, optional = true }
|
||||
tree-sitter-rust = { workspace = true, optional = true }
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ pub fn benches() {
|
|||
let store = SettingsStore::test(cx);
|
||||
cx.set_global(store);
|
||||
assets::Assets.load_test_fonts(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
// release_channel::init(semver::Version::new(0,0,0), cx);
|
||||
editor::init(cx);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ mod tests {
|
|||
use serde_json::json;
|
||||
use settings::{AccentContent, SettingsStore};
|
||||
use text::{Bias, OffsetRangeExt, ToOffset};
|
||||
use theme::ThemeStyleContent;
|
||||
use theme_settings::ThemeStyleContent;
|
||||
|
||||
use util::{path, post_inc};
|
||||
|
||||
|
|
|
|||
|
|
@ -4036,7 +4036,7 @@ pub mod tests {
|
|||
let settings = SettingsStore::test(cx);
|
||||
cx.set_global(settings);
|
||||
crate::init(cx);
|
||||
theme::init(LoadThemes::JustBase, cx);
|
||||
theme_settings::init(LoadThemes::JustBase, cx);
|
||||
cx.update_global::<SettingsStore, _>(|store, cx| {
|
||||
store.update_user_settings(cx, f);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4830,7 +4830,7 @@ mod tests {
|
|||
fn init_test(cx: &mut gpui::App) {
|
||||
let settings = SettingsStore::test(cx);
|
||||
cx.set_global(settings);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
assets::Assets.load_test_fonts(cx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ impl FoldPlaceholder {
|
|||
pub fn fold_element(fold_id: FoldId, cx: &App) -> Stateful<gpui::Div> {
|
||||
use gpui::{InteractiveElement as _, StatefulInteractiveElement as _, Styled as _};
|
||||
use settings::Settings as _;
|
||||
use theme::{ActiveTheme as _, ThemeSettings};
|
||||
use theme::ActiveTheme as _;
|
||||
use theme_settings::ThemeSettings;
|
||||
let settings = ThemeSettings::get_global(cx);
|
||||
gpui::div()
|
||||
.id(fold_id)
|
||||
|
|
|
|||
|
|
@ -2227,7 +2227,7 @@ mod tests {
|
|||
fn init_test(cx: &mut App) {
|
||||
let store = SettingsStore::test(cx);
|
||||
cx.set_global(store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
}
|
||||
|
||||
/// Helper to create test highlights for an inlay
|
||||
|
|
|
|||
|
|
@ -1664,7 +1664,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let settings = SettingsStore::test(cx);
|
||||
cx.set_global(settings);
|
||||
theme::init(LoadThemes::JustBase, cx);
|
||||
theme_settings::init(LoadThemes::JustBase, cx);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -204,8 +204,8 @@ use task::TaskVariables;
|
|||
use text::{BufferId, FromAnchor, OffsetUtf16, Rope, ToOffset as _, ToPoint as _};
|
||||
use theme::{
|
||||
AccentColors, ActiveTheme, GlobalTheme, PlayerColor, StatusColors, SyntaxTheme, Theme,
|
||||
ThemeSettings, observe_buffer_font_size_adjustment,
|
||||
};
|
||||
use theme_settings::{ThemeSettings, observe_buffer_font_size_adjustment};
|
||||
use ui::{
|
||||
Avatar, ButtonSize, ButtonStyle, ContextMenu, Disclosure, IconButton, IconButtonShape,
|
||||
IconName, IconSize, Indicator, Key, Tooltip, h_flex, prelude::*, scrollbars::ScrollbarAutoHide,
|
||||
|
|
@ -9936,7 +9936,11 @@ impl Editor {
|
|||
h_flex()
|
||||
.px_0p5()
|
||||
.when(is_platform_style_mac, |parent| parent.gap_0p5())
|
||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.font(
|
||||
theme_settings::ThemeSettings::get_global(cx)
|
||||
.buffer_font
|
||||
.clone(),
|
||||
)
|
||||
.text_size(TextSize::XSmall.rems(cx))
|
||||
.child(h_flex().children(ui::render_modifiers(
|
||||
keystroke.modifiers(),
|
||||
|
|
@ -9967,7 +9971,11 @@ impl Editor {
|
|||
|
||||
if keystroke.modifiers().modified() {
|
||||
h_flex()
|
||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.font(
|
||||
theme_settings::ThemeSettings::get_global(cx)
|
||||
.buffer_font
|
||||
.clone(),
|
||||
)
|
||||
.when(is_platform_style_mac, |parent| parent.gap_1())
|
||||
.child(h_flex().children(ui::render_modifiers(
|
||||
keystroke.modifiers(),
|
||||
|
|
@ -10473,7 +10481,11 @@ impl Editor {
|
|||
.gap_2()
|
||||
.pr_1()
|
||||
.overflow_x_hidden()
|
||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
||||
.font(
|
||||
theme_settings::ThemeSettings::get_global(cx)
|
||||
.buffer_font
|
||||
.clone(),
|
||||
)
|
||||
.child(left)
|
||||
.child(preview),
|
||||
)
|
||||
|
|
@ -24446,7 +24458,7 @@ impl Editor {
|
|||
return None;
|
||||
}
|
||||
|
||||
let theme_settings = theme::ThemeSettings::get_global(cx);
|
||||
let theme_settings = theme_settings::ThemeSettings::get_global(cx);
|
||||
let theme = cx.theme();
|
||||
let accent_colors = theme.accents().clone();
|
||||
|
||||
|
|
|
|||
|
|
@ -29721,7 +29721,7 @@ pub(crate) fn init_test(cx: &mut TestAppContext, f: fn(&mut AllLanguageSettingsC
|
|||
assets::Assets.load_test_fonts(cx);
|
||||
let store = SettingsStore::test(cx);
|
||||
cx.set_global(store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
release_channel::init(semver::Version::new(0, 0, 0), cx);
|
||||
crate::init(cx);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -83,7 +83,8 @@ use std::{
|
|||
};
|
||||
use sum_tree::Bias;
|
||||
use text::{BufferId, SelectionGoal};
|
||||
use theme::{ActiveTheme, Appearance, BufferLineHeight, PlayerColor};
|
||||
use theme::{ActiveTheme, Appearance, PlayerColor};
|
||||
use theme_settings::BufferLineHeight;
|
||||
use ui::utils::ensure_minimum_contrast;
|
||||
use ui::{
|
||||
ButtonLike, ContextMenu, Indicator, KeyBinding, POPOVER_Y_PADDING, Tooltip, prelude::*,
|
||||
|
|
@ -8448,7 +8449,7 @@ pub(crate) fn render_buffer_header(
|
|||
el.child(Icon::new(IconName::FileLock).color(Color::Muted))
|
||||
})
|
||||
.when_some(breadcrumbs, |then, breadcrumbs| {
|
||||
let font = theme::ThemeSettings::get_global(cx)
|
||||
let font = theme_settings::ThemeSettings::get_global(cx)
|
||||
.buffer_font
|
||||
.clone();
|
||||
then.child(render_breadcrumb_text(
|
||||
|
|
|
|||
|
|
@ -746,7 +746,7 @@ mod tests {
|
|||
let settings = SettingsStore::test(cx);
|
||||
cx.set_global(settings);
|
||||
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
|
||||
crate::init(cx);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ use std::{
|
|||
};
|
||||
use std::{ops::Range, sync::Arc, time::Duration};
|
||||
use std::{path::PathBuf, rc::Rc};
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{CopyButton, Scrollbars, WithScrollbar, prelude::*, theme_is_transparent};
|
||||
use url::Url;
|
||||
use util::TryFutureExt;
|
||||
|
|
|
|||
|
|
@ -4798,7 +4798,7 @@ let c = 3;"#
|
|||
cx.update(|cx| {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
release_channel::init(semver::Version::new(0, 0, 0), cx);
|
||||
crate::init(cx);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -980,7 +980,9 @@ impl Item for Editor {
|
|||
// In a non-singleton case, the breadcrumbs are actually shown on sticky file headers of the multibuffer.
|
||||
fn breadcrumbs(&self, cx: &App) -> Option<(Vec<HighlightedText>, Option<Font>)> {
|
||||
if self.buffer.read(cx).is_singleton() {
|
||||
let font = theme::ThemeSettings::get_global(cx).buffer_font.clone();
|
||||
let font = theme_settings::ThemeSettings::get_global(cx)
|
||||
.buffer_font
|
||||
.clone();
|
||||
Some((self.breadcrumbs_inner(cx)?, Some(font)))
|
||||
} else {
|
||||
None
|
||||
|
|
|
|||
|
|
@ -1393,7 +1393,7 @@ mod tests {
|
|||
fn init_test(cx: &mut gpui::App) {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
crate::init(cx);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1383,7 +1383,7 @@ mod tests {
|
|||
async fn test_theme_override_changes_restyle_semantic_tokens(cx: &mut TestAppContext) {
|
||||
use collections::IndexMap;
|
||||
use gpui::{Hsla, Rgba, UpdateGlobal as _};
|
||||
use theme::{HighlightStyleContent, ThemeStyleContent};
|
||||
use theme_settings::{HighlightStyleContent, ThemeStyleContent};
|
||||
|
||||
init_test(cx, |_| {});
|
||||
|
||||
|
|
@ -1548,7 +1548,7 @@ mod tests {
|
|||
async fn test_per_theme_overrides_restyle_semantic_tokens(cx: &mut TestAppContext) {
|
||||
use collections::IndexMap;
|
||||
use gpui::{Hsla, Rgba, UpdateGlobal as _};
|
||||
use theme::{HighlightStyleContent, ThemeStyleContent};
|
||||
use theme_settings::{HighlightStyleContent, ThemeStyleContent};
|
||||
use ui::ActiveTheme as _;
|
||||
|
||||
init_test(cx, |_| {});
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use settings::Settings;
|
|||
use std::ops::Range;
|
||||
use std::time::Duration;
|
||||
use text::Rope;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{
|
||||
ActiveTheme, AnyElement, ButtonCommon, ButtonStyle, Clickable, FluentBuilder, IconButton,
|
||||
IconButtonShape, IconName, IconSize, InteractiveElement, IntoElement, Label, LabelCommon,
|
||||
|
|
|
|||
|
|
@ -2118,7 +2118,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let store = SettingsStore::test(cx);
|
||||
cx.set_global(store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
crate::init(cx);
|
||||
});
|
||||
let project = Project::test(FakeFs::new(cx.executor()), [], cx).await;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ serde_json_lenient.workspace = true
|
|||
settings_content.workspace = true
|
||||
snippet_provider.workspace = true
|
||||
task.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
tokio = { workspace = true, features = ["full"] }
|
||||
toml.workspace = true
|
||||
tree-sitter.workspace = true
|
||||
|
|
|
|||
|
|
@ -413,7 +413,8 @@ async fn test_themes(
|
|||
) -> Result<()> {
|
||||
for relative_theme_path in &manifest.themes {
|
||||
let theme_path = extension_path.join(relative_theme_path);
|
||||
let theme_family = theme::deserialize_user_theme(&fs.load_bytes(&theme_path).await?)?;
|
||||
let theme_family =
|
||||
theme_settings::deserialize_user_theme(&fs.load_bytes(&theme_path).await?)?;
|
||||
log::info!("loaded theme family {}", theme_family.name);
|
||||
|
||||
for theme in &theme_family.themes {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ project = { workspace = true, features = ["test-support"] }
|
|||
|
||||
reqwest_client.workspace = true
|
||||
theme = { workspace = true, features = ["test-support"] }
|
||||
theme_settings.workspace = true
|
||||
theme_extension.workspace = true
|
||||
zlog.workspace = true
|
||||
|
||||
|
|
|
|||
|
|
@ -1007,7 +1007,7 @@ fn init_test(cx: &mut TestAppContext) {
|
|||
cx.set_global(store);
|
||||
release_channel::init(semver::Version::new(0, 0, 0), cx);
|
||||
extension::init(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
gpui_tokio::init(cx);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ settings.workspace = true
|
|||
smallvec.workspace = true
|
||||
strum.workspace = true
|
||||
telemetry.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
ui.workspace = true
|
||||
util.workspace = true
|
||||
vim_mode_setting.workspace = true
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use project::DirectoryLister;
|
|||
use release_channel::ReleaseChannel;
|
||||
use settings::{Settings, SettingsContent};
|
||||
use strum::IntoEnumIterator as _;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{
|
||||
Banner, Chip, ContextMenu, Divider, PopoverMenu, ScrollableHandle, Switch, ToggleButtonGroup,
|
||||
ToggleButtonGroupSize, ToggleButtonGroupStyle, ToggleButtonSimple, Tooltip, WithScrollbar,
|
||||
|
|
|
|||
|
|
@ -47,3 +47,4 @@ theme = { workspace = true, features = ["test-support"] }
|
|||
workspace = { workspace = true, features = ["test-support"] }
|
||||
zlog.workspace = true
|
||||
remote_connection = { workspace = true, features = ["test-support"] }
|
||||
theme_settings = { workspace = true, features = ["test-support"] }
|
||||
|
|
@ -3789,7 +3789,7 @@ async fn open_queried_buffer(
|
|||
fn init_test(cx: &mut TestAppContext) -> Arc<AppState> {
|
||||
cx.update(|cx| {
|
||||
let state = AppState::test(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
super::init(cx);
|
||||
editor::init(cx);
|
||||
state
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ project.workspace = true
|
|||
settings.workspace = true
|
||||
smallvec.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
time.workspace = true
|
||||
ui.workspace = true
|
||||
workspace.workspace = true
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ use std::{
|
|||
sync::OnceLock,
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
use theme::{AccentColors, ThemeSettings};
|
||||
use theme::AccentColors;
|
||||
use theme_settings::ThemeSettings;
|
||||
use time::{OffsetDateTime, UtcOffset, format_description::BorrowedFormatItem};
|
||||
use ui::{
|
||||
ButtonLike, Chip, CommonAnimationExt as _, ContextMenu, DiffStat, Divider, ScrollableHandle,
|
||||
|
|
@ -2489,7 +2490,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ smol.workspace = true
|
|||
strum.workspace = true
|
||||
telemetry.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
time.workspace = true
|
||||
time_format.workspace = true
|
||||
ui.workspace = true
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use gpui::{
|
|||
use markdown::{Markdown, MarkdownElement};
|
||||
use project::{git_store::Repository, project_settings::ProjectSettings};
|
||||
use settings::Settings as _;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use time::OffsetDateTime;
|
||||
use ui::{ContextMenu, CopyButton, Divider, prelude::*, tooltip_container};
|
||||
use workspace::Workspace;
|
||||
|
|
|
|||
|
|
@ -1325,7 +1325,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
editor::init(cx);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use markdown::{Markdown, MarkdownElement};
|
|||
use project::git_store::Repository;
|
||||
use settings::Settings;
|
||||
use std::hash::Hash;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use time::{OffsetDateTime, UtcOffset};
|
||||
use ui::{Avatar, CopyButton, Divider, prelude::*, tooltip_container};
|
||||
use workspace::Workspace;
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ use std::ops::Range;
|
|||
use std::path::Path;
|
||||
use std::{sync::Arc, time::Duration, usize};
|
||||
use strum::{IntoEnumIterator, VariantNames};
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use time::OffsetDateTime;
|
||||
use ui::{
|
||||
ButtonLike, Checkbox, CommonAnimationExt, ContextMenu, ElevationIndex, IndentGuideColors,
|
||||
|
|
@ -6491,7 +6491,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(LoadThemes::JustBase, cx);
|
||||
theme_settings::init(LoadThemes::JustBase, cx);
|
||||
editor::init(cx);
|
||||
crate::init(cx);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1777,7 +1777,7 @@ mod tests {
|
|||
settings.editor.diff_view_style = Some(DiffViewStyle::Unified);
|
||||
});
|
||||
});
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
editor::init(cx);
|
||||
crate::init(cx);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@ mod tests {
|
|||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
editor::init(cx);
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ mod tests {
|
|||
settings.editor.diff_view_style = Some(DiffViewStyle::Unified);
|
||||
});
|
||||
});
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ log.workspace = true
|
|||
project.workspace = true
|
||||
serde.workspace = true
|
||||
settings.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
ui.workspace = true
|
||||
util.workspace = true
|
||||
workspace.workspace = true
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ use language::File as _;
|
|||
use persistence::ImageViewerDb;
|
||||
use project::{ImageItem, Project, ProjectPath, image_store::ImageItemEvent};
|
||||
use settings::Settings;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{Tooltip, prelude::*};
|
||||
use util::paths::PathExt;
|
||||
use workspace::{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ language.workspace = true
|
|||
project.workspace = true
|
||||
serde_json.workspace = true
|
||||
serde_json_lenient.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
ui.workspace = true
|
||||
util.workspace = true
|
||||
util_macros.workspace = true
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ fn render_inspector(
|
|||
window: &mut Window,
|
||||
cx: &mut Context<Inspector>,
|
||||
) -> AnyElement {
|
||||
let ui_font = theme::setup_ui_font(window, cx);
|
||||
let ui_font = theme_settings::setup_ui_font(window, cx);
|
||||
let colors = cx.theme().colors();
|
||||
let inspector_id = inspector.active_element_id();
|
||||
let toolbar_height = platform_title_bar_height(window);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ settings.workspace = true
|
|||
telemetry.workspace = true
|
||||
tempfile.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
tree-sitter-json.workspace = true
|
||||
tree-sitter-rust.workspace = true
|
||||
ui_input.workspace = true
|
||||
|
|
|
|||
|
|
@ -3431,7 +3431,7 @@ impl ActionArgumentsEditor {
|
|||
|
||||
impl Render for ActionArgumentsEditor {
|
||||
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
let settings = theme::ThemeSettings::get_global(cx);
|
||||
let settings = theme_settings::ThemeSettings::get_global(cx);
|
||||
let colors = cx.theme().colors();
|
||||
|
||||
let border_color = if self.is_loading {
|
||||
|
|
|
|||
|
|
@ -1115,7 +1115,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
});
|
||||
|
||||
let fs = FakeFs::new(cx.executor());
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ unindent.workspace = true
|
|||
util = { workspace = true, features = ["test-support"] }
|
||||
zlog.workspace = true
|
||||
criterion.workspace = true
|
||||
theme_settings.workspace = true
|
||||
|
||||
[[bench]]
|
||||
name = "highlight_map"
|
||||
|
|
|
|||
|
|
@ -3247,7 +3247,7 @@ fn test_undo_after_merge_into_base(cx: &mut TestAppContext) {
|
|||
async fn test_preview_edits(cx: &mut TestAppContext) {
|
||||
cx.update(|cx| {
|
||||
init_settings(cx, |_| {});
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
});
|
||||
|
||||
let insertion_style = HighlightStyle {
|
||||
|
|
|
|||
|
|
@ -44,4 +44,5 @@ release_channel.workspace = true
|
|||
gpui = { workspace = true, features = ["test-support"] }
|
||||
semver.workspace = true
|
||||
util = { workspace = true, features = ["test-support"] }
|
||||
zlog.workspace = true
|
||||
zlog.workspace = true
|
||||
theme_settings.workspace = true
|
||||
|
|
@ -109,7 +109,7 @@ fn init_test(cx: &mut gpui::TestAppContext) {
|
|||
cx.update(|cx| {
|
||||
let settings_store = SettingsStore::test(cx);
|
||||
cx.set_global(settings_store);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
release_channel::init(semver::Version::new(0, 0, 0), cx);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ settings.workspace = true
|
|||
stacksafe.workspace = true
|
||||
sum_tree.workspace = true
|
||||
theme.workspace = true
|
||||
theme_settings.workspace = true
|
||||
ui.workspace = true
|
||||
util.workspace = true
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ pub fn main() {
|
|||
cx.bind_keys([KeyBinding::new("cmd-c", markdown::Copy, None)]);
|
||||
|
||||
let node_runtime = NodeRuntime::unavailable();
|
||||
theme::init(LoadThemes::JustBase, cx);
|
||||
theme_settings::init(LoadThemes::JustBase, cx);
|
||||
|
||||
let fs = fs::FakeFs::new(cx.background_executor().clone());
|
||||
let language_registry = LanguageRegistry::new(cx.background_executor().clone());
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ pub fn main() {
|
|||
let language_registry = Arc::new(LanguageRegistry::new(cx.background_executor().clone()));
|
||||
let fs = fs::FakeFs::new(cx.background_executor().clone());
|
||||
languages::init(language_registry, fs, node_runtime, cx);
|
||||
theme::init(LoadThemes::JustBase, cx);
|
||||
theme_settings::init(LoadThemes::JustBase, cx);
|
||||
Assets.load_fonts(cx).unwrap();
|
||||
|
||||
cx.activate(true);
|
||||
|
|
|
|||
|
|
@ -505,7 +505,7 @@ mod tests {
|
|||
settings::init(cx);
|
||||
}
|
||||
if !cx.has_global::<theme::GlobalTheme>() {
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use mermaid::{
|
|||
};
|
||||
pub use path_range::{LineCol, PathWithRange};
|
||||
use settings::Settings as _;
|
||||
use theme::ThemeSettings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::Checkbox;
|
||||
use ui::CopyButton;
|
||||
|
||||
|
|
@ -2677,7 +2677,7 @@ mod tests {
|
|||
settings::init(cx);
|
||||
}
|
||||
if !cx.has_global::<theme::GlobalTheme>() {
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ mod tests {
|
|||
settings::init(cx);
|
||||
}
|
||||
if !cx.has_global::<theme::GlobalTheme>() {
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
theme_settings::init(theme::LoadThemes::JustBase, cx);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue