diff --git a/frame/item/containeritem.cpp b/frame/item/containeritem.cpp
index 375bb83c5..7f4207926 100644
--- a/frame/item/containeritem.cpp
+++ b/frame/item/containeritem.cpp
@@ -4,7 +4,6 @@
ContainerItem::ContainerItem(QWidget *parent)
: DockItem(parent),
- m_icon(":/indicator/resources/arrow_up_normal.png"),
m_containerWidget(new ContainerWidget(this))
{
m_containerWidget->setVisible(false);
@@ -53,8 +52,18 @@ void ContainerItem::paintEvent(QPaintEvent *e)
if (DockDisplayMode == Dock::Fashion)
return;
+ QPixmap icon;
+ switch (DockPosition)
+ {
+ case Top: icon = QPixmap(":/icons/resources/arrow-down.svg"); break;
+ case Left: icon = QPixmap(":/icons/resources/arrow-right.svg"); break;
+ case Bottom: icon = QPixmap(":/icons/resources/arrow-up.svg"); break;
+ case Right: icon = QPixmap(":/icons/resources/arrow-left.svg"); break;
+ default: Q_UNREACHABLE();
+ }
+
QPainter painter(this);
- painter.drawPixmap(rect().center() - m_icon.rect().center(), m_icon);
+ painter.drawPixmap(rect().center() - icon.rect().center(), icon);
}
void ContainerItem::mouseReleaseEvent(QMouseEvent *e)
diff --git a/frame/item/containeritem.h b/frame/item/containeritem.h
index 563a79053..ddeac1d0e 100644
--- a/frame/item/containeritem.h
+++ b/frame/item/containeritem.h
@@ -27,8 +27,6 @@ protected:
QSize sizeHint() const;
private:
- QPixmap m_icon;
-
ContainerWidget *m_containerWidget;
};
diff --git a/frame/item/resources.qrc b/frame/item/resources.qrc
index dc87fc058..6e091cd01 100644
--- a/frame/item/resources.qrc
+++ b/frame/item/resources.qrc
@@ -4,7 +4,11 @@
resources/indicator.png
resources/indicator_ver.png
resources/indicator_active_ver.png
- resources/arrow_up_normal.png
- resources/arrow_down_normal.png
+
+
+ resources/arrow-up.svg
+ resources/arrow-right.svg
+ resources/arrow-left.svg
+ resources/arrow-down.svg
diff --git a/frame/item/resources/arrow-down.svg b/frame/item/resources/arrow-down.svg
new file mode 100644
index 000000000..03c33c877
--- /dev/null
+++ b/frame/item/resources/arrow-down.svg
@@ -0,0 +1,18 @@
+
+
\ No newline at end of file
diff --git a/frame/item/resources/arrow-left.svg b/frame/item/resources/arrow-left.svg
new file mode 100644
index 000000000..398fbf4df
--- /dev/null
+++ b/frame/item/resources/arrow-left.svg
@@ -0,0 +1,18 @@
+
+
\ No newline at end of file
diff --git a/frame/item/resources/arrow-right.svg b/frame/item/resources/arrow-right.svg
new file mode 100644
index 000000000..25a187ff1
--- /dev/null
+++ b/frame/item/resources/arrow-right.svg
@@ -0,0 +1,18 @@
+
+
\ No newline at end of file
diff --git a/frame/item/resources/arrow-up.svg b/frame/item/resources/arrow-up.svg
new file mode 100644
index 000000000..261b96e16
--- /dev/null
+++ b/frame/item/resources/arrow-up.svg
@@ -0,0 +1,18 @@
+
+
\ No newline at end of file
diff --git a/frame/item/resources/arrow_down_normal.png b/frame/item/resources/arrow_down_normal.png
deleted file mode 100644
index 934c6f323..000000000
Binary files a/frame/item/resources/arrow_down_normal.png and /dev/null differ
diff --git a/frame/item/resources/arrow_up_normal.png b/frame/item/resources/arrow_up_normal.png
deleted file mode 100644
index 41618ff5a..000000000
Binary files a/frame/item/resources/arrow_up_normal.png and /dev/null differ
diff --git a/plugins/disk-mount/diskpluginitem.cpp b/plugins/disk-mount/diskpluginitem.cpp
index 87243b968..412843ea3 100644
--- a/plugins/disk-mount/diskpluginitem.cpp
+++ b/plugins/disk-mount/diskpluginitem.cpp
@@ -4,11 +4,13 @@
#include
#include
#include
+#include
DiskPluginItem::DiskPluginItem(QWidget *parent)
: QWidget(parent),
m_displayMode(Dock::Efficient)
{
+ QIcon::setThemeName("deepin");
}
void DiskPluginItem::setDockDisplayMode(const Dock::DisplayMode mode)
@@ -53,9 +55,11 @@ QSize DiskPluginItem::sizeHint() const
void DiskPluginItem::updateIcon()
{
if (m_displayMode == Dock::Efficient)
- m_icon = ImageUtil::loadSvg(":/icons/resources/icon-small.svg", 16);
+// m_icon = ImageUtil::loadSvg(":/icons/resources/icon-small.svg", 16);
+ m_icon = QIcon::fromTheme("drive-removable-dock-symbolic").pixmap(16, 16);
else
- m_icon = ImageUtil::loadSvg(":/icons/resources/icon.svg", std::min(width(), height()) * 0.8);
+// m_icon = ImageUtil::loadSvg(":/icons/resources/icon.svg", std::min(width(), height()) * 0.8);
+ m_icon = QIcon::fromTheme("drive-removable-dock").pixmap(std::min(width(), height()) * 0.8, std::min(width(), height()) * 0.8);
update();
}