112 lines
5.1 KiB
Diff
112 lines
5.1 KiB
Diff
|
|
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
|
|||
|
|
|