From 552208099115ee07897e536466b31ed3ae359dad Mon Sep 17 00:00:00 2001 From: shuttle slave Date: Tue, 22 Sep 2026 11:22:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20palette=20color=20arrays=20to=20d?= =?UTF-8?q?tk=20preference=20dconfig=20feat:=20=E5=9C=A8=20dtk=20preferenc?= =?UTF-8?q?e=20dconfig=20=E4=B8=AD=E6=96=B0=E5=A2=9E=E8=B0=83=E8=89=B2?= =?UTF-8?q?=E6=9D=BF=E9=A2=9C=E8=89=B2=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Delete org.deepin.dtk.palette.json and org.deepin.dtk.palette.dark.json 2. Add 4 array keys to org.deepin.dtk.preference.json: lightQPalette, darkQPalette, lightDPalette, darkDPalette 3. Each array contains #AARRGGBB color strings ordered by QPalette::ColorRole or DPalette::ColorType enum 4. Reuse existing org.deepin.dtk.preference dconfig instance instead of separate palette schema files 5. Use camelCase naming for config keys 1. 删除 org.deepin.dtk.palette.json 和 org.deepin.dtk.palette.dark.json 2. 在 org.deepin.dtk.preference.json 中新增 4 个数组配置项:lightQPalette、darkQPalette、lightDPalette、darkDPalette 3. 每个数组包含按 QPalette::ColorRole 或 DPalette::ColorType 枚举顺序排列的 #AARRGGBB 颜色字符串 4. 复用已有的 org.deepin.dtk.preference dconfig 实例,不再使用独立的 palette schema 文件 5. 配置项 key 使用小驼峰命名 PMS: DDE-330 Log: 迁移调色板颜色配置到 dconfig,使用数组型配置项替代独立 palette schema 文件,配置项使用小驼峰命名 Influence: 无 --- configs/org.deepin.dtk.preference.json | 112 ++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 1 deletion(-) diff --git a/configs/org.deepin.dtk.preference.json b/configs/org.deepin.dtk.preference.json index 1df2c60..957f5f9 100644 --- a/configs/org.deepin.dtk.preference.json +++ b/configs/org.deepin.dtk.preference.json @@ -66,7 +66,9 @@ "rules": { "value": "*.debug=false;*.info=false", "serial": 2, - "flags": ["global"], + "flags": [ + "global" + ], "name": "The logging rules of dtk applications", "name[zh_CN]": "日志输出的规则配置", "description": "Configure the category and level of log output", @@ -137,6 +139,114 @@ "description": "Configure the color mode", "permissions": "readwrite", "visibility": "private" + }, + "lightQPalette": { + "value": [ + "#B2000000", + "#FFE5E5E5", + "#FFE6E6E6", + "#FFE5E5E5", + "#FFE3E3E3", + "#FFE4E4E4", + "#B2000000", + "#FF000000", + "#B2000000", + "#FFFFFFFF", + "#FFF8F8F8", + "#0C000000", + "#FF0081FF", + "#FFFFFFFF", + "#FF0082FA", + "#FFAD4579", + "#07000000", + "#FFFFFFFF", + "#CCFFFFFF", + "#D8000000" + ], + "serial": 0, + "name": "Light QPalette color array", + "name[zh_CN]": "亮色调色板颜色数组", + "description": "Color array for light theme QPalette, ordered by QPalette::ColorRole enum (WindowText through ToolTipText)", + "description[zh_CN]": "亮色主题QPalette颜色数组,按QPalette::ColorRole枚举顺序排列(WindowText至ToolTipText)", + "permissions": "readwrite", + "visibility": "public" + }, + "darkQPalette": { + "value": [ + "#B2FFFFFF", + "#FF444444", + "#FF484848", + "#FF474747", + "#FF414141", + "#FF434343", + "#B2FFFFFF", + "#FFFFFFFF", + "#B2FFFFFF", + "#FF282828", + "#FF252525", + "#0C000000", + "#FF024CCA", + "#FFF1F6FF", + "#FF0082FA", + "#FFAD4579", + "#0C000000", + "#FF000000", + "#CC2D2D2D", + "#D8FFFFFF" + ], + "serial": 0, + "name": "Dark QPalette color array", + "name[zh_CN]": "暗色调色板颜色数组", + "description": "Color array for dark theme QPalette, ordered by QPalette::ColorRole enum (WindowText through ToolTipText)", + "description[zh_CN]": "暗色主题QPalette颜色数组,按QPalette::ColorRole枚举顺序排列(WindowText至ToolTipText)", + "permissions": "readwrite", + "visibility": "public" + }, + "lightDPalette": { + "value": [ + "", + "#07000000", + "#D8000000", + "#99000000", + "#FFFF5736", + "#FF000000", + "#FF0081FF", + "#FF0081FF", + "#0C000000", + "#66555555", + "#19000000", + "#19000000" + ], + "serial": 0, + "name": "Light DPalette color array", + "name[zh_CN]": "亮色DPalette颜色数组", + "description": "Color array for light theme DPalette, ordered by DPalette::ColorType enum (NoType through ObviousBackground)", + "description[zh_CN]": "亮色主题DPalette颜色数组,按DPalette::ColorType枚举顺序排列(NoType至ObviousBackground)", + "permissions": "readwrite", + "visibility": "public" + }, + "darkDPalette": { + "value": [ + "", + "#0CFFFFFF", + "#D8FFFFFF", + "#99FFFFFF", + "#FFE43F2E", + "#FFFFFFFF", + "#FF0059D2", + "#FF0059D2", + "#19FFFFFF", + "#66C0C6D4", + "#CC000000", + "#19FFFFFF" + ], + "serial": 0, + "name": "Dark DPalette color array", + "name[zh_CN]": "暗色DPalette颜色数组", + "description": "Color array for dark theme DPalette, ordered by DPalette::ColorType enum (NoType through ObviousBackground)", + "description[zh_CN]": "暗色主题DPalette颜色数组,按DPalette::ColorType枚举顺序排列(NoType至ObviousBackground)", + "permissions": "readwrite", + "visibility": "public" } } }