fix: 修复个性化页面,插件图标不遵循状态变化的问题

插件图标跟随字体颜色,按照dtk内嵌的原则重新设置一下

Log: 界面显示优化
Bug: https://pms.uniontech.com/zentao/bug-view-103063.html
Influence: 控制中心-个性化  插件显示区域  插件图标跟随字体颜色
Change-Id: I965801b438ed9629ac0a6d7e880c91a89e6923eb
This commit is contained in:
范朋程 2021-11-17 11:36:43 +08:00
parent ac71d8bf0d
commit 296069dfe0
11 changed files with 18 additions and 18 deletions

View File

@ -229,14 +229,14 @@ void ModuleWidget::initUI()
if (reply.error().type() != QDBusError::ErrorType::NoError) {
qWarning() << "dbus call failed, method: 'GetLoadedPlugins()'";
} else {
const QMap<QString, QString> &pluginIconMap = {{"AiAssistant", ":/icons/plugins/assistant.svg"}
, {"show-desktop", ":/icons/plugins/desktop.svg"}
, {"onboard", ":/icons/plugins/keyboard.svg"}
, {"notifications", ":/icons/plugins/notify.svg"}
, {"shutdown", ":/icons/plugins/power.svg"}
, {"multitasking", ":/icons/plugins/task.svg"}
, {"datetime", ":/icons/plugins/time.svg"}
, {"trash", ":/icons/plugins/trash.svg"}};
const QMap<QString, QString> &pluginIconMap = {{"AiAssistant", "dcc_dock_assistant"}
, {"show-desktop", "dcc_dock_desktop"}
, {"onboard", "dcc_dock_keyboard"}
, {"notifications", "dcc_dock_notify"}
, {"shutdown", "dcc_dock_power"}
, {"multitasking", "dcc_dock_task"}
, {"datetime", "dcc_dock_time"}
, {"trash", "dcc_dock_trash"}};
if (plugins.size() != 0) {
layout->addSpacing(10);
layout->addWidget(m_pluginAreaTitle);
@ -279,7 +279,7 @@ void ModuleWidget::initUI()
// 插件图标
auto leftAction = new DViewItemAction(Qt::AlignVCenter, size, size, true);
leftAction->setIcon(QIcon::fromTheme(pluginIconMap.value(m_dockInter->getPluginKey(name), ":/icons/plugins/plug-in2.svg")));
leftAction->setIcon(QIcon::fromTheme(pluginIconMap.value(m_dockInter->getPluginKey(name), "dcc_dock_plug_in")));
item->setActionList(Qt::Edge::LeftEdge, {leftAction});
auto rightAction = new DViewItemAction(Qt::AlignVCenter, size, size, true);

View File

@ -1,17 +1,17 @@
<RCC>
<qresource prefix="/icons/deepin/builtin">
<file>actions/icon_dock_32px.svg</file>
<file>texts/dcc_dock_time_16px.svg</file>
<file>texts/dcc_dock_assistant_16px.svg</file>
<file>texts/dcc_dock_desktop_16px.svg</file>
<file>texts/dcc_dock_keyboard_16px.svg</file>
<file>texts/dcc_dock_notify_16px.svg</file>
<file>texts/dcc_dock_plug_in_16px.svg</file>
<file>texts/dcc_dock_power_16px.svg</file>
<file>texts/dcc_dock_task_16px.svg</file>
<file>texts/dcc_dock_trash_16px.svg</file>
</qresource>
<qresource prefix="/">
<file>icons/plugins/time.svg</file>
<file>icons/plugins/assistant.svg</file>
<file>icons/plugins/desktop.svg</file>
<file>icons/plugins/keyboard.svg</file>
<file>icons/plugins/notify.svg</file>
<file>icons/plugins/plug-in2.svg</file>
<file>icons/plugins/power.svg</file>
<file>icons/plugins/task.svg</file>
<file>icons/plugins/trash.svg</file>
<file>translations/dcc-dock-plugin.ts</file>
<file>translations/dcc-dock-plugin_bo.ts</file>
<file>translations/dcc-dock-plugin_az.ts</file>

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 873 B

After

Width:  |  Height:  |  Size: 873 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 981 B

After

Width:  |  Height:  |  Size: 981 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 831 B

After

Width:  |  Height:  |  Size: 831 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB