add Storage arrow icon

This commit is contained in:
tanyulong2021 2021-11-05 10:03:50 +08:00
parent c201062fce
commit 43f3c34a36
2 changed files with 71 additions and 1 deletions

View File

@ -0,0 +1,63 @@
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

View File

@ -2,7 +2,7 @@
Name: ukui-panel
Version: 3.0.2
Release: 6
Release: 7
Summary: ukui desktop panel
License: LGPL-2.1+ GPL-2+ LGPL-3
URL: http://www.ukui.org
@ -46,6 +46,8 @@ Provides: ukui-indicators
patch0: 0001-block-taskbar-right-click.patch
patch1: 0002-Fixes-an-issue-with-a-year-jump-exception.patch
patch2: 0003-Modify-some-modules-translation-error.patch
patch3: 0004-add-Storage-arrow-icon.patch
%description
The ukui desktop panel is used on ukui desktop and has some plugins like
@ -57,6 +59,8 @@ patch2: 0003-Modify-some-modules-translation-error.patch
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
cp -rf %{SOURCE1} %{_builddir}/%{name}-%{version}/panel/resources
%build
@ -80,6 +84,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/*
%changelog
* Tue Nov 02 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.2-7
- add Storage arrow icon
* Sat Sep 18 2021 peijiankang <peijiankang@kylinos.cn> - 3.0.2-6
- Modify some modules translation error