!25 change coloeFontWidget some ui options
From: @peijiankang Reviewed-by: @tanyulong2021 Signed-off-by: @tanyulong2021
This commit is contained in:
commit
ce6f30115b
93
0011-change-coloeFontWidget-some-ui-options.patch
Normal file
93
0011-change-coloeFontWidget-some-ui-options.patch
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
From 15e9127686ece049524c8ca2ac8e16629769174f Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Wed, 13 Jul 2022 14:14:10 +0800
|
||||||
|
Subject: [PATCH] change coloeFontWidget some ui options
|
||||||
|
|
||||||
|
---
|
||||||
|
src/widgets/capture/fontsize_color_chose.cpp | 26 ++++++++++++++-----
|
||||||
|
src/widgets/capture/fontsize_color_chose2.cpp | 21 ++++++++++++---
|
||||||
|
2 files changed, 36 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/widgets/capture/fontsize_color_chose.cpp b/src/widgets/capture/fontsize_color_chose.cpp
|
||||||
|
index a5d5ba0..7a26c7f 100755
|
||||||
|
--- a/src/widgets/capture/fontsize_color_chose.cpp
|
||||||
|
+++ b/src/widgets/capture/fontsize_color_chose.cpp
|
||||||
|
@@ -121,18 +121,30 @@ void FontSize_Color_Chose::paintEvent(QPaintEvent *event)
|
||||||
|
if (color_rect == rect){
|
||||||
|
Rect_h = rect.height()+4;
|
||||||
|
Rect_w = rect.width() +4;
|
||||||
|
- painter.setBrush(QColor(255,255,255));
|
||||||
|
- painter.drawEllipse(QRect(rect.x()-2,rect.y()-2,Rect_h,Rect_w));
|
||||||
|
- painter.setBrush(QColor(0,0,0));
|
||||||
|
- painter.drawEllipse(rect);
|
||||||
|
+ painter.setBrush(QColor(255,255,255));
|
||||||
|
+ painter.drawEllipse(QRect(rect.x()-2,rect.y()-2,Rect_h,Rect_w));
|
||||||
|
+ if ((context.style_name.compare("ukui-dark") == 0)
|
||||||
|
+ || (context.style_name.compare("ukui-black") == 0)) {
|
||||||
|
+ painter.setBrush(QColor(Qt::gray));
|
||||||
|
+ } else
|
||||||
|
+ painter.setBrush(QColor(0, 0, 0));
|
||||||
|
+ painter.drawEllipse(rect);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
- painter.setBrush(QColor(78,78,78));
|
||||||
|
+ if ((context.style_name.compare("ukui-dark") == 0)
|
||||||
|
+ || (context.style_name.compare("ukui-black") == 0)) {
|
||||||
|
+ painter.setBrush(QColor(Qt::gray));
|
||||||
|
+ } else
|
||||||
|
+ painter.setBrush(QColor(78, 78, 78));
|
||||||
|
painter.drawEllipse(rect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- painter.setBrush(QColor(25,25,25));
|
||||||
|
- painter.drawRect(80,31,1,17);
|
||||||
|
+ if ((context.style_name.compare("ukui-dark") == 0)
|
||||||
|
+ || (context.style_name.compare("ukui-black") == 0)) {
|
||||||
|
+ painter.setBrush(QColor(Qt::gray));
|
||||||
|
+ } else
|
||||||
|
+ painter.setBrush(QColor(25, 25, 25, 153));
|
||||||
|
+ painter.drawRect(85,33,1.52,16);
|
||||||
|
for (int i =4;i<12;i++)
|
||||||
|
{
|
||||||
|
QRect rect = m_colorAreaList.at(i);
|
||||||
|
diff --git a/src/widgets/capture/fontsize_color_chose2.cpp b/src/widgets/capture/fontsize_color_chose2.cpp
|
||||||
|
index cd2b89c..859c2ab 100755
|
||||||
|
--- a/src/widgets/capture/fontsize_color_chose2.cpp
|
||||||
|
+++ b/src/widgets/capture/fontsize_color_chose2.cpp
|
||||||
|
@@ -121,16 +121,29 @@ void FontSize_Color_Chose2::paintEvent(QPaintEvent *event)
|
||||||
|
Rect_w = rect.width() +4;
|
||||||
|
painter.setBrush(QColor(255,255,255));
|
||||||
|
painter.drawEllipse(QRect(rect.x()-2,rect.y()-2,Rect_h,Rect_w));
|
||||||
|
- painter.setBrush(QColor(0,0,0));
|
||||||
|
+ if ((context.style_name.compare("ukui-dark") == 0)
|
||||||
|
+ || (context.style_name.compare("ukui-black") == 0)) {
|
||||||
|
+ painter.setBrush(QColor(Qt::gray));
|
||||||
|
+ } else
|
||||||
|
+ painter.setBrush(QColor(0, 0, 0));
|
||||||
|
+ painter.drawEllipse(rect);
|
||||||
|
painter.drawEllipse(rect);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
- painter.setBrush(QColor(78,78,78));
|
||||||
|
+ if ((context.style_name.compare("ukui-dark") == 0)
|
||||||
|
+ || (context.style_name.compare("ukui-black") == 0)) {
|
||||||
|
+ painter.setBrush(QColor(Qt::gray));
|
||||||
|
+ } else
|
||||||
|
+ painter.setBrush(QColor(78, 78, 78));
|
||||||
|
painter.drawEllipse(rect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- painter.setBrush(QColor(25,25,25));
|
||||||
|
- painter.drawRect(80,17,1,14);
|
||||||
|
+ if ((context.style_name.compare("ukui-dark") == 0)
|
||||||
|
+ || (context.style_name.compare("ukui-black") == 0)) {
|
||||||
|
+ painter.setBrush(QColor(Qt::gray));
|
||||||
|
+ } else
|
||||||
|
+ painter.setBrush(QColor(25, 25, 25, 153));
|
||||||
|
+ painter.drawRect(80,17,1.52,16);
|
||||||
|
for (int i =4;i<12;i++)
|
||||||
|
{
|
||||||
|
QRect rect = m_colorAreaList.at(i);
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
Name: kylin-screenshot
|
Name: kylin-screenshot
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Release: 14
|
Release: 15
|
||||||
Summary: a powerful screenshot and screen recording tool
|
Summary: a powerful screenshot and screen recording tool
|
||||||
License: GPL-3.0-or-later and LGPL-3.0-or-later and MIT and Apache-2.0
|
License: GPL-3.0-or-later and LGPL-3.0-or-later and MIT and Apache-2.0
|
||||||
URL: https://github.com/ubuntukylin
|
URL: https://github.com/ubuntukylin
|
||||||
@ -38,6 +38,7 @@ patch7: 0007-change-text-property-in-time.patch
|
|||||||
patch8: 0008-change-notify-information-about-application-name.patch
|
patch8: 0008-change-notify-information-about-application-name.patch
|
||||||
patch9: 0009-add-changelog-for-1.0.1.patch
|
patch9: 0009-add-changelog-for-1.0.1.patch
|
||||||
patch10: 0010-pin-windget-windowIcon-follow-theme.patch
|
patch10: 0010-pin-windget-windowIcon-follow-theme.patch
|
||||||
|
patch11: 0011-change-coloeFontWidget-some-ui-options.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Powerful yet simple-to-use screenshot software
|
Powerful yet simple-to-use screenshot software
|
||||||
@ -60,6 +61,7 @@ patch10: 0010-pin-windget-windowIcon-follow-theme.patch
|
|||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
|
%patch11 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default kylin-screenshot.pro
|
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default kylin-screenshot.pro
|
||||||
@ -110,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/metainfo/kylinscreenshot.appdata.xml
|
%{_datadir}/metainfo/kylinscreenshot.appdata.xml
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 13 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.0-15
|
||||||
|
- change coloeFontWidget some ui options
|
||||||
|
|
||||||
* Wed Jul 13 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.0-14
|
* Wed Jul 13 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.0-14
|
||||||
- pin windget windowIcon follow theme
|
- pin windget windowIcon follow theme
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user