From 926480475fce6445cbd3e16fb319481608e83a31 Mon Sep 17 00:00:00 2001 From: tanjing Date: Wed, 28 Feb 2024 15:15:59 +0800 Subject: [PATCH] =?UTF-8?q?progressbar=20=E5=A4=96=E9=83=A8=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=AE=BE=E7=BD=AE=E6=B2=A1=E6=9C=89=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/patches/0034-progressbar.patch | 47 +++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 48 insertions(+) create mode 100644 debian/patches/0034-progressbar.patch diff --git a/debian/patches/0034-progressbar.patch b/debian/patches/0034-progressbar.patch new file mode 100644 index 0000000..468863d --- /dev/null +++ b/debian/patches/0034-progressbar.patch @@ -0,0 +1,47 @@ +From: tanjing +Date: Wed, 28 Feb 2024 15:15:59 +0800 +Subject: =?utf-8?b?cHJvZ3Jlc3NiYXIg5aSW6YOo5bGe5oCn6K6+572u5rKh5pyJ5ZON5bqU?= + =?utf-8?b?5aSE55CG?= + +--- + .../qt5-config-style-ukui/ukui-config-style.cpp | 19 ++++++++++++++----- + 1 file changed, 14 insertions(+), 5 deletions(-) + +diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp +index 696428a..547a01b 100644 +--- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp ++++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp +@@ -5874,8 +5874,8 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp + { + if (const QStyleOptionProgressBar *pb = qstyleoption_cast(option)) { + sp->initConfigProgressBarParameters(isUseDarkPalette(), pb, widget); +- +- QBrush brush = sp->m_ProgressBarParameters.progressBarContentBrush; ++ QColor progressBarContentHightColor = sp->m_ProgressBarParameters.progressBarContentHightColor; ++ QColor progressBarContentMidLightColor = sp->m_ProgressBarParameters.progressBarContentMidLightColor; + + const bool vertical = pb->orientation == Qt::Vertical; + const bool inverted = pb->invertedAppearance; +@@ -5884,10 +5884,19 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp + if (inverted) + reverse = !reverse; + +- QColor progressBarContentHightColor = sp->m_ProgressBarParameters.progressBarContentHightColor; +- QColor progressBarContentMidLightColor = sp->m_ProgressBarParameters.progressBarContentMidLightColor; +- + QLinearGradient linearGradient; ++ if(vertical){ ++ linearGradient.setStart(pb->rect.bottomRight()); ++ linearGradient.setFinalStop(pb->rect.topLeft()); ++ } ++ else{ ++ linearGradient.setStart(pb->rect.topLeft()); ++ linearGradient.setFinalStop(pb->rect.bottomRight()); ++ } ++ linearGradient.setColorAt(0, progressBarContentMidLightColor); ++ linearGradient.setColorAt(1, progressBarContentHightColor); ++ QBrush brush(linearGradient); ++ + if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { + if(animation->state() == QAbstractAnimation::Running){ + bool forward = animation->direction() == QAbstractAnimation::Forward; diff --git a/debian/patches/series b/debian/patches/series index 19758bf..1f0f03b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -31,3 +31,4 @@ 0031-test.patch 0032-Update-changelog-4.1.0.0-0k31.patch 0033-Remove-gitignore.patch +0034-progressbar.patch