Files
mqttx/gpui-app/src/lib.rs
T
JoeAllen dd57077e0c fix(theme): 修复注册循环被 bisect 残留覆盖——亮色预设全部失效
Solarized Light 等亮色预设不生效的根因:此前栈溢出二分时
register_bundled_themes 被改为「只注册 catppuccin 4 个」的探针版,
后续恢复只还原了 truncate 而漏掉了注册循环本体(BUNDLED_THEME_FILES
全量循环留在 0..0 死代码里)。暗色预设(Catppuccin Mocha)碰巧可用,
亮色一律回退深色。

恢复全量注册循环;39 个预设名(Linear + 38)注册验证通过;
Catppuccin Mocha / Solarized Light 双预设实机截图验证生效。
顺带移除排查期临时打点,恢复用户 settings 为 system/linear。
2026-10-12 19:31:07 +08:00

31 lines
1.1 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//! MQTTX:数据模型、持久化、MQTT 引擎与 GPUI 界面。
// 语言包编译期内嵌(key = 语义标识符,en/zh-CN 并排);miss 回退 en
rust_i18n::i18n!("locales", fallback = "en");
/// 把 gpui-kit 组件内置文案(按钮/日历/空态等)并入当前语言包。
/// 启动时调用一次;extend! 展开引用本 crate 的 _rust_i18n_backend,
/// 必须在 lib 内调用(bin crate 的 crate:: 指向不同根)。
pub fn init_i18n() {
use gpui_kit::component as gpui_component;
rust_i18n::extend!(gpui_component);
}
/// 注册官方捆绑主题预设(38 个)。必须在 `gpui_kit::init` 之后、
/// 打开窗口之前调用(bootstrap 阶段):注册触发 ThemeRegistry 的
/// 全局观察者回调(Theme::change + 全窗刷新),在窗口已挂满 UI 时
/// 连续注册会引发大规模重绘级联。
pub fn init_themes(cx: &mut gpui_kit::App) {
ui::app::theme::register_bundled_themes(cx);
}
pub mod aliyun;
pub mod model;
pub mod mqtt;
pub mod platform;
pub mod store;
pub mod sysmon;
pub mod ui;
pub mod update;