From 4353f9da347e6c7d7aae9eea7e2704ba2a283d28 Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Tue, 22 Jul 2025 12:34:00 +0800 Subject: [PATCH] feat: qtct --- modules/desktop/style/default.nix | 9 ++++++++ modules/desktop/style/qtct/qt5ct.conf | 32 +++++++++++++++++++++++++++ modules/desktop/style/qtct/qt6ct.conf | 32 +++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 modules/desktop/style/qtct/qt5ct.conf create mode 100644 modules/desktop/style/qtct/qt6ct.conf diff --git a/modules/desktop/style/default.nix b/modules/desktop/style/default.nix index b653b00..c53f82f 100644 --- a/modules/desktop/style/default.nix +++ b/modules/desktop/style/default.nix @@ -64,6 +64,15 @@ lib.my.makeSwitch { ]; platformTheme.name = "qtct"; }; + + xdg.configFile = { + "qt5ct/qt5ct.conf".source = pkgs.replaceVars ./qtct/qt5ct.conf { + darker = pkgs.libsForQt5.qt5ct + /share/qt5ct/colors/darker.conf; + }; + "qt6ct/qt6ct.conf".source = pkgs.replaceVars ./qtct/qt6ct.conf { + darker = pkgs.qt6ct + /share/qt6ct/colors/darker.conf; + }; + }; }; }; } diff --git a/modules/desktop/style/qtct/qt5ct.conf b/modules/desktop/style/qtct/qt5ct.conf new file mode 100644 index 0000000..8dde337 --- /dev/null +++ b/modules/desktop/style/qtct/qt5ct.conf @@ -0,0 +1,32 @@ +[Appearance] +color_scheme_path=@darker@ +custom_palette=true +icon_theme=Papirus-Dark +standard_dialogs=xdgdesktopportal +style=Darkly + +[Fonts] +fixed="Noto Sans CJK SC,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" +general="Noto Sans CJK SC,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" + +[Interface] +activate_item_on_single_click=1 +buttonbox_layout=0 +cursor_flash_time=1000 +dialog_buttons_have_icons=1 +double_click_interval=400 +gui_effects=@Invalid() +keyboard_scheme=2 +menus_have_icons=true +show_shortcuts_in_context_menus=true +stylesheets=@Invalid() +toolbutton_style=4 +underline_shortcut=1 +wheel_scroll_lines=3 + +[SettingsWindow] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\t\0\0\x4\x1b\0\0\0\0\0\0\0\0\0\0\x3\t\0\0\x4\x1b\0\0\0\0\0\0\0\0\b\0\0\0\0\0\0\0\0\0\0\0\x3\t\0\0\x4\x1b) + +[Troubleshooting] +force_raster_widgets=1 +ignored_applications=@Invalid() diff --git a/modules/desktop/style/qtct/qt6ct.conf b/modules/desktop/style/qtct/qt6ct.conf new file mode 100644 index 0000000..8dde337 --- /dev/null +++ b/modules/desktop/style/qtct/qt6ct.conf @@ -0,0 +1,32 @@ +[Appearance] +color_scheme_path=@darker@ +custom_palette=true +icon_theme=Papirus-Dark +standard_dialogs=xdgdesktopportal +style=Darkly + +[Fonts] +fixed="Noto Sans CJK SC,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" +general="Noto Sans CJK SC,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" + +[Interface] +activate_item_on_single_click=1 +buttonbox_layout=0 +cursor_flash_time=1000 +dialog_buttons_have_icons=1 +double_click_interval=400 +gui_effects=@Invalid() +keyboard_scheme=2 +menus_have_icons=true +show_shortcuts_in_context_menus=true +stylesheets=@Invalid() +toolbutton_style=4 +underline_shortcut=1 +wheel_scroll_lines=3 + +[SettingsWindow] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\t\0\0\x4\x1b\0\0\0\0\0\0\0\0\0\0\x3\t\0\0\x4\x1b\0\0\0\0\0\0\0\0\b\0\0\0\0\0\0\0\0\0\0\0\x3\t\0\0\x4\x1b) + +[Troubleshooting] +force_raster_widgets=1 +ignored_applications=@Invalid()