64 lines
1.5 KiB
Diff
64 lines
1.5 KiB
Diff
From 72e48c3df50c808ab1e5624d93a5dd048bd6df04 Mon Sep 17 00:00:00 2001
|
|
From: tanyulong <tanyulong@kylinos.cn>
|
|
Date: Tue, 2 Nov 2021 17:46:47 +0800
|
|
Subject: [PATCH] add Storage arrow icon
|
|
|
|
---
|
|
plugin-tray/storagearrow.cpp | 21 +++++++++++++++++++++
|
|
plugin-tray/storagearrow.h | 15 +++++++++++++++
|
|
2 files changed, 36 insertions(+)
|
|
create mode 100644 plugin-tray/storagearrow.cpp
|
|
create mode 100644 plugin-tray/storagearrow.h
|
|
|
|
diff --git a/plugin-tray/storagearrow.cpp b/plugin-tray/storagearrow.cpp
|
|
new file mode 100644
|
|
index 0000000..32d65fe
|
|
--- /dev/null
|
|
+++ b/plugin-tray/storagearrow.cpp
|
|
@@ -0,0 +1,21 @@
|
|
+#include "storagearrow.h"
|
|
+#include "../panel/customstyle.h"
|
|
+TrayButton::TrayButton(QWidget* parent):
|
|
+ QToolButton(parent)
|
|
+{
|
|
+ setStyle(new CustomStyle());
|
|
+ setIcon(QIcon("/usr/share/ukui-panel/panel/img/up.svg"));
|
|
+ setVisible(false);
|
|
+}
|
|
+
|
|
+TrayButton::~TrayButton() { }
|
|
+
|
|
+void TrayButton::enterEvent(QEvent *) {
|
|
+ repaint();
|
|
+ return;
|
|
+}
|
|
+
|
|
+void TrayButton::leaveEvent(QEvent *) {
|
|
+ repaint();
|
|
+ return;
|
|
+}
|
|
diff --git a/plugin-tray/storagearrow.h b/plugin-tray/storagearrow.h
|
|
new file mode 100644
|
|
index 0000000..9fbf92d
|
|
--- /dev/null
|
|
+++ b/plugin-tray/storagearrow.h
|
|
@@ -0,0 +1,15 @@
|
|
+#ifndef STORAGEARROW_H
|
|
+#define STORAGEARROW_H
|
|
+
|
|
+
|
|
+//Qt
|
|
+#include <QToolButton>
|
|
+class TrayButton : public QToolButton {
|
|
+ public :
|
|
+ TrayButton(QWidget* parent );
|
|
+ ~TrayButton();
|
|
+ protected :
|
|
+ void enterEvent(QEvent *);
|
|
+ void leaveEvent(QEvent *);
|
|
+};
|
|
+#endif
|
|
--
|
|
2.30.0
|
|
|