From f1f73d8c49888e076a012325b55e93f65683b1ef Mon Sep 17 00:00:00 2001 From: zhaofangxun Date: Tue, 20 Oct 2026 16:37:03 +0800 Subject: [PATCH] fix: adjust quick panel icon/text color alpha and add hover state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Root cause: iconTextPalette in DockPalette.qml used 100% opacity for normal/normalDark states and lacked hovered/hoveredDark definitions, making colors non-compliant with system design spec 2. Fix: change normal/normalDark alpha from 1.0 to 0.7, add hovered and hoveredDark states with alpha=1.0; bind SettingButton textColor to iconTextPalette in PanelPluginPage.qml 3. Impact: quick panel icons and text now show 70% opacity by default and 100% on hover; SettingButton follows the same palette Log: quick panel icon/text color adjusted to 70% opacity with hover effect Influence: 1. Verify quick panel icon/text color in light mode (70% opacity) 2. Verify quick panel icon/text color in dark mode (70% opacity) 3. Verify hover state shows 100% opacity for icons and text 4. Verify SettingButton color matches other panel items fix: 调整快捷面板图标文字颜色透明度并补充hover状态 1. 根因:DockPalette.qml 中 iconTextPalette 的 normal/normalDark 状态 使用 100% 不透明度,且未定义 hovered/hoveredDark 状态,不符合系统 设计规范要求 2. 方案:将 normal/normalDark 的 alpha 从 1.0 改为 0.7,新增 hovered 和 hoveredDark 状态 alpha=1.0;PanelPluginPage.qml 中 SettingButton 绑定 textColor 到 iconTextPalette 3. 影响:快捷面板图标和文字默认显示 70% 不透明度,hover 时显示 100%; SettingButton 同步使用统一调色板 Log: 快捷面板图标文字颜色调整为70%透明度并增加hover效果 Influence: 1. 验证浅色模式下快捷面板图标文字颜色(70%不透明度) 2. 验证深色模式下快捷面板图标文字颜色(70%不透明度) 3. 验证hover状态下图标文字显示100%不透明度 4. 验证设置按钮颜色与其他面板项一致 PMS: BUG-314503 --- panels/dock/DockPalette.qml | 8 +++++++- panels/dock/tray/quickpanel/PanelPluginPage.qml | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/panels/dock/DockPalette.qml b/panels/dock/DockPalette.qml index a087d80d8..3501b5554 100644 --- a/panels/dock/DockPalette.qml +++ b/panels/dock/DockPalette.qml @@ -145,9 +145,15 @@ Item { property D.Palette iconTextPalette: D.Palette { normal { - common: Qt.rgba(0, 0, 0, 1) + common: Qt.rgba(0, 0, 0, 0.7) } normalDark { + common: Qt.rgba(1, 1, 1, 0.7) + } + hovered { + common: Qt.rgba(0, 0, 0, 1) + } + hoveredDark { common: Qt.rgba(1, 1, 1, 1) } } diff --git a/panels/dock/tray/quickpanel/PanelPluginPage.qml b/panels/dock/tray/quickpanel/PanelPluginPage.qml index 7fb9cb611..db39302a8 100644 --- a/panels/dock/tray/quickpanel/PanelPluginPage.qml +++ b/panels/dock/tray/quickpanel/PanelPluginPage.qml @@ -9,6 +9,7 @@ import QtQml.Models import QtQml import org.deepin.ds 1.0 +import org.deepin.ds.dock 1.0 import org.deepin.dtk 1.0 import org.deepin.dtk.private 1.0 import org.deepin.dtk.style 1.0 as DStyle @@ -107,6 +108,7 @@ Item { implicitWidth: DStyle.Style.toolButton.width implicitHeight: DStyle.Style.toolButton.height + textColor: DockPalette.iconTextPalette palette.windowText: ColorSelector.textColor flat: true icon {