!23 解决按钮反白的问题
From: @peijiankang Reviewed-by: @dou33 Signed-off-by: @dou33
This commit is contained in:
commit
c7b56b8a35
111
0008-Solve-the-problem-of-button-backlighting.patch
Normal file
111
0008-Solve-the-problem-of-button-backlighting.patch
Normal file
@ -0,0 +1,111 @@
|
||||
From 18a5bdd07df6e7e783e6b8a67d8e683c4e88caa0 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Mon, 11 Jul 2022 14:48:55 +0800
|
||||
Subject: [PATCH] Solve the problem of button backlighting
|
||||
|
||||
---
|
||||
debian/changelog | 6 ++++++
|
||||
debian/files | 2 +-
|
||||
res.qrc | 2 ++
|
||||
res/control_icons/dark-window-close.svg | 1 +
|
||||
res/control_icons/dark-window-min.svg | 1 +
|
||||
src/mainwindow.cpp | 4 ++--
|
||||
src/menumodule.cpp | 3 +++
|
||||
7 files changed, 16 insertions(+), 3 deletions(-)
|
||||
create mode 100755 res/control_icons/dark-window-close.svg
|
||||
create mode 100755 res/control_icons/dark-window-min.svg
|
||||
|
||||
diff --git a/debian/changelog b/debian/changelog
|
||||
index d698926..00662f9 100644
|
||||
--- a/debian/changelog
|
||||
+++ b/debian/changelog
|
||||
@@ -1,3 +1,9 @@
|
||||
+indicator-china-weather (3.1.0-38) v101; urgency=medium
|
||||
+
|
||||
+ * 按钮反白
|
||||
+
|
||||
+ -- baijincheng <baijincheng@kylinos.cn> Sat,16 Jan 2021 21:33:00 +0800
|
||||
+
|
||||
indicator-china-weather (3.1.0-37) v101; urgency=medium
|
||||
|
||||
* 解决了BUG#30685 程序没有IP定位功能
|
||||
diff --git a/debian/files b/debian/files
|
||||
index ae998ce..57d4dc5 100644
|
||||
--- a/debian/files
|
||||
+++ b/debian/files
|
||||
@@ -1 +1 @@
|
||||
-indicator-china-weather_3.1.0-32_source.buildinfo utils optional
|
||||
+indicator-china-weather_3.1.0-38_source.buildinfo utils optional
|
||||
diff --git a/res.qrc b/res.qrc
|
||||
index 587661d..5655539 100644
|
||||
--- a/res.qrc
|
||||
+++ b/res.qrc
|
||||
@@ -386,6 +386,8 @@
|
||||
<file>res/forecast-icons/1x/900.png</file>
|
||||
<file>res/forecast-icons/1x/901.png</file>
|
||||
<file>res/forecast-icons/1x/999.png</file>
|
||||
+ <file>res/control_icons/dark-window-close.svg</file>
|
||||
+ <file>res/control_icons/dark-window-min.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/data">
|
||||
<file>data/china-city-list.csv</file>
|
||||
diff --git a/res/control_icons/dark-window-close.svg b/res/control_icons/dark-window-close.svg
|
||||
new file mode 100755
|
||||
index 0000000..f5b9a00
|
||||
--- /dev/null
|
||||
+++ b/res/control_icons/dark-window-close.svg
|
||||
@@ -0,0 +1 @@
|
||||
+<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><defs><style>.cls-1{fill:#fff;}</style></defs><title>画板 4</title><rect class="cls-1" x="6.45" y="0.45" width="1" height="13" transform="translate(6.95 -2.88) rotate(45)"/><rect class="cls-1" x="6.45" y="0.45" width="1" height="13" transform="translate(16.78 6.95) rotate(135)"/></svg>
|
||||
\ No newline at end of file
|
||||
diff --git a/res/control_icons/dark-window-min.svg b/res/control_icons/dark-window-min.svg
|
||||
new file mode 100755
|
||||
index 0000000..8c0e53e
|
||||
--- /dev/null
|
||||
+++ b/res/control_icons/dark-window-min.svg
|
||||
@@ -0,0 +1 @@
|
||||
+<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><defs><style>.cls-1{fill:#fff;}</style></defs><title>画板 3</title><rect class="cls-1" x="2" y="7" width="10" height="1"/></svg>
|
||||
\ No newline at end of file
|
||||
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
|
||||
index 9c43bde..53d3915 100644
|
||||
--- a/src/mainwindow.cpp
|
||||
+++ b/src/mainwindow.cpp
|
||||
@@ -231,14 +231,14 @@ void MainWindow::initControlQss()
|
||||
ui->centralwidget->setStyleSheet("#centralwidget{color:white;background-image:url(':/res/background/weather-clear.png');background-repeat:no-repeat;}");
|
||||
ui->centralwidget->move(10,10);
|
||||
ui->centralwidget->setFixedSize(865,520);
|
||||
- ui->btnMinimize->setIcon(QIcon::fromTheme("window-minimize-symbolic"));
|
||||
+ ui->btnMinimize->setIcon(QIcon::fromTheme(":/res/control_icons/dark-window-min.svg"));
|
||||
ui->btnMinimize->setFixedSize(30,30);
|
||||
ui->btnMinimize->setStyleSheet("QPushButton{border:0px;border-radius:4px;background:transparent;}"
|
||||
"QPushButton:Hover{border:0px;border-radius:4px;background:transparent;background-color:rgba(0,0,0,0.1);}"
|
||||
"QPushButton:Pressed{border:0px;border-radius:4px;background:transparent;background-color:rgba(0,0,0,0.15);}");
|
||||
ui->btnMinimize->setFocusPolicy(Qt::NoFocus);//设置焦点类型
|
||||
|
||||
- ui->btnCancel->setIcon(QIcon::fromTheme("window-close-symbolic"));
|
||||
+ ui->btnCancel->setIcon(QIcon::fromTheme(":/res/control_icons/dark-window-close.svg"));
|
||||
ui->btnCancel->setFixedSize(30,30);
|
||||
ui->btnCancel->setStyleSheet("QPushButton{border:0px;border-radius:4px;background:transparent;}"
|
||||
"QPushButton:Hover{border:0px;border-radius:4px;background:transparent;background-color:#F86457;}"
|
||||
diff --git a/src/menumodule.cpp b/src/menumodule.cpp
|
||||
index 3e83462..b5372f9 100644
|
||||
--- a/src/menumodule.cpp
|
||||
+++ b/src/menumodule.cpp
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "menumodule.h"
|
||||
#include "xatom-helper.h"
|
||||
+
|
||||
menuModule::menuModule(QWidget *parent = nullptr) : QWidget(parent)
|
||||
{
|
||||
init();
|
||||
@@ -14,6 +15,8 @@ void menuModule::initAction(){
|
||||
iconSize = QSize(30,30);
|
||||
menuButton = new QPushButton;
|
||||
menuButton->setIcon(QIcon::fromTheme("application-menu"));
|
||||
+ menuButton->setProperty("setIconHighlightEffectDefaultColor", QColor(Qt::white));
|
||||
+ menuButton->setStyleSheet("color:rgba(255,255,255,1);");
|
||||
menuButton->setFlat(true);
|
||||
menuButton->setFixedSize(iconSize);
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
%define debug_package %{nil}
|
||||
Name: indicator-china-weather
|
||||
Version: 3.1.0
|
||||
Release: 14
|
||||
Release: 15
|
||||
Summary: The weather data are from the heweather API s6 version.
|
||||
License: GPL-3.0+
|
||||
URL: https://github.com/UbuntuKylin/indicator-china-weather
|
||||
@ -29,6 +29,7 @@ patch4: 0004-update-translation-file.patch
|
||||
patch5: 0005-Increase-the-drag-bar-of-forecast-part.patch
|
||||
patch6: 0006-Hide-tray-icon-in-case-of-network-exception.patch
|
||||
patch7: 0007-Repair-menu-button-hover-style-exception.patch
|
||||
patch8: 0008-Solve-the-problem-of-button-backlighting.patch
|
||||
|
||||
%description
|
||||
Indicator that displays China weather information
|
||||
@ -46,6 +47,7 @@ patch7: 0007-Repair-menu-button-hover-style-exception.patch
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
|
||||
%build
|
||||
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default indicator-china-weather.pro
|
||||
@ -77,6 +79,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/man/man1/indicator-china-weather.1.gz
|
||||
|
||||
%changelog
|
||||
* Mon Jul 11 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.0-15
|
||||
- 解决按钮反白的问题
|
||||
|
||||
* Wed Jun 29 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.0-14
|
||||
- 修复菜单按钮hover样式异常
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user