mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
fix: add multitasking-view and show-desktop dcc icon
add multitasking-view and show-desktop dcc icon log:
This commit is contained in:
parent
119d72b0ea
commit
af35000028
9
plugins/multitasking/icons/dcc-multitasking-view.svg
Normal file
9
plugins/multitasking/icons/dcc-multitasking-view.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>icon/dock-set/task</title>
|
||||
<g id="icon/dock-set/task" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.7">
|
||||
<g id="task" transform="translate(1.000000, 2.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<path d="M12,0 C13.1045695,0 14,0.8954305 14,2 L14,10 C14,11.1045695 13.1045695,12 12,12 L2,12 C0.8954305,12 0,11.1045695 0,10 L0,2 C0,0.8954305 0.8954305,0 2,0 L12,0 Z M4.5,7 L2.5,7 C2.22385763,7 2,7.22385763 2,7.5 L2,7.5 L2,9.5 C2,9.7761424 2.22385763,10 2.5,10 L2.5,10 L4.5,10 C4.77614237,10 5,9.7761424 5,9.5 L5,9.5 L5,7.5 C5,7.22385763 4.77614237,7 4.5,7 L4.5,7 Z M11.5,7 L7.5,7 C7.22385763,7 7,7.22385763 7,7.5 L7,7.5 L7,9.5 C7,9.7761424 7.22385763,10 7.5,10 L7.5,10 L11.5,10 C11.7761424,10 12,9.7761424 12,9.5 L12,9.5 L12,7.5 C12,7.22385763 11.7761424,7 11.5,7 L11.5,7 Z M6.5,2 L2.5,2 C2.22385763,2 2,2.22385763 2,2.5 L2,2.5 L2,4.5 C2,4.77614237 2.22385763,5 2.5,5 L2.5,5 L6.5,5 C6.77614237,5 7,4.77614237 7,4.5 L7,4.5 L7,2.5 C7,2.22385763 6.77614237,2 6.5,2 L6.5,2 Z M11.5,2 L9.5,2 C9.2238576,2 9,2.22385763 9,2.5 L9,2.5 L9,4.5 C9,4.77614237 9.2238576,5 9.5,5 L9.5,5 L11.5,5 C11.7761424,5 12,4.77614237 12,4.5 L12,4.5 L12,2.5 C12,2.22385763 11.7761424,2 11.5,2 L11.5,2 Z" id="形状结合"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
@ -139,6 +139,14 @@ void MultitaskingPlugin::invokedMenuItem(const QString &itemKey, const QString &
|
||||
}
|
||||
}
|
||||
|
||||
QIcon MultitaskingPlugin::icon(const DockPart &dockPart, DGuiApplicationHelper::ColorType themeType)
|
||||
{
|
||||
if (dockPart == DockPart::DCCSetting)
|
||||
return QIcon::fromTheme("dcc-multitasking-view",QIcon(":/icons/icons/dcc-multitasking-view.svg"));
|
||||
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
void MultitaskingPlugin::refreshIcon(const QString &itemKey)
|
||||
{
|
||||
if (itemKey == PLUGIN_KEY) {
|
||||
|
@ -37,6 +37,7 @@ public:
|
||||
void setSortKey(const QString &itemKey, const int order) override;
|
||||
PluginType type() override;
|
||||
PluginFlags flags() const override;
|
||||
QIcon icon(const DockPart &dockPart, DGuiApplicationHelper::ColorType themeType) override;
|
||||
|
||||
private:
|
||||
QScopedPointer<MultitaskingWidget> m_multitaskingWidget;
|
||||
|
@ -1,5 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/deepin-multitasking-view.svg</file>
|
||||
<file>icons/dcc-multitasking-view.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
9
plugins/show-desktop/icons/dcc-show-desktop.svg
Normal file
9
plugins/show-desktop/icons/dcc-show-desktop.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>icon/dock-set/desktop</title>
|
||||
<g id="icon/dock-set/desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.7">
|
||||
<g id="desktop" transform="translate(1.000000, 2.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<path d="M12,0 C13.1045695,0 14,0.8954305 14,2 L14,10 C14,11.1045695 13.1045695,12 12,12 L2,12 C0.8954305,12 0,11.1045695 0,10 L0,2 C0,0.8954305 0.8954305,0 2,0 L12,0 Z M11.5,9 L2.5,9 C2.22385763,9 2,9.2238576 2,9.5 L2,9.5 L2,10.5 C2,10.7761424 2.22385763,11 2.5,11 L2.5,11 L11.5,11 C11.7761424,11 12,10.7761424 12,10.5 L12,10.5 L12,9.5 C12,9.2238576 11.7761424,9 11.5,9 L11.5,9 Z M3.5,5 L2.5,5 C2.22385763,5 2,5.22385763 2,5.5 L2,5.5 L2,6.5 C2,6.77614237 2.22385763,7 2.5,7 L2.5,7 L3.5,7 C3.77614237,7 4,6.77614237 4,6.5 L4,6.5 L4,5.5 C4,5.22385763 3.77614237,5 3.5,5 L3.5,5 Z M3.5,2 L2.5,2 C2.22385763,2 2,2.22385763 2,2.5 L2,2.5 L2,3.5 C2,3.77614237 2.22385763,4 2.5,4 L2.5,4 L3.5,4 C3.77614237,4 4,3.77614237 4,3.5 L4,3.5 L4,2.5 C4,2.22385763 3.77614237,2 3.5,2 L3.5,2 Z" id="形状结合"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
5
plugins/show-desktop/resource.qrc
Normal file
5
plugins/show-desktop/resource.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/dcc-show-desktop.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -119,6 +119,16 @@ void ShowDesktopPlugin::refreshIcon(const QString &itemKey)
|
||||
}
|
||||
}
|
||||
|
||||
QIcon ShowDesktopPlugin::icon(const DockPart &dockPart, DGuiApplicationHelper::ColorType themeType)
|
||||
{
|
||||
|
||||
if (dockPart == DockPart::DCCSetting) {
|
||||
return QIcon::fromTheme("dcc-show-desktop", QIcon(":/icons/icons/dcc-show-desktop.svg"));
|
||||
}
|
||||
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
int ShowDesktopPlugin::itemSortKey(const QString &itemKey)
|
||||
{
|
||||
const QString key = QString("pos_%1_%2").arg(itemKey).arg(Dock::Efficient);
|
||||
|
@ -36,6 +36,7 @@ public:
|
||||
void setSortKey(const QString &itemKey, const int order) override;
|
||||
PluginType type() override;
|
||||
PluginFlags flags() const override;
|
||||
QIcon icon(const DockPart &dockPart, DGuiApplicationHelper::ColorType themeType) override;
|
||||
|
||||
private:
|
||||
QScopedPointer<ShowDesktopWidget> m_showDesktopWidget;
|
||||
|
Loading…
x
Reference in New Issue
Block a user