94 lines
3.9 KiB
Diff
94 lines
3.9 KiB
Diff
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
|
|
|