mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-10 02:09:46 +08:00
feat(ui): 添加深色模式支持
- 新增深色/浅色模式切换按钮,位于主窗口底部 - 在配置文件中定义主题颜色(浅色/深色背景、列表背景、前景色) - 更新 UI 工具函数以支持动态主题切换,包括列表斑马纹适配 - 添加翻译条目(Dark Mode/Light Mode)并更新编译脚本 - 修改主窗口创建逻辑,集成主题切换回调 - 调整列表背景色属性从 BACKCOLOR 改为 BGCOLOR 以保持一致性
This commit is contained in:
@@ -17,6 +17,7 @@ int btn_ok_cb(Ihandle *self);
|
||||
int btn_cancel_cb(Ihandle *self);
|
||||
int btn_help_cb(Ihandle *self);
|
||||
int btn_lang_cb(Ihandle *self);
|
||||
int darkmode_cb(Ihandle *self);
|
||||
|
||||
// 撤销/重做回调
|
||||
int btn_undo_cb(Ihandle *self);
|
||||
|
||||
@@ -17,4 +17,8 @@ void refresh_single_list_style(Ihandle *list);
|
||||
// 会先清空列表然后重新添加所有项,最后刷新样式
|
||||
void sync_string_list_to_ui(Ihandle *list_ui, const StringList *str_list);
|
||||
|
||||
// 深色模式状态管理
|
||||
void set_dark_mode(int enabled);
|
||||
int get_dark_mode(void);
|
||||
|
||||
#endif // UI_UTILS_H
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#define CTRL_BTN_CANCEL "BTN_CANCEL"
|
||||
#define CTRL_BTN_HELP "BTN_HELP"
|
||||
#define CTRL_BTN_LANG "BTN_LANG"
|
||||
#define CTRL_BTN_DARKMODE "BTN_DARKMODE"
|
||||
|
||||
// 撤销/重做按钮
|
||||
#define CTRL_BTN_UNDO "BTN_UNDO"
|
||||
|
||||
Reference in New Issue
Block a user