From 9b151f282e88c53c4446f43c8b1219504de01dfdeeb1656e2ba1f08c7482a0f7 Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Wed, 15 Mar 2023 08:22:37 +0000 Subject: [PATCH 1/2] Accepting request 1071929 from home:Vogtinator:plasma5.27 Plasma 5.27.3 OBS-URL: https://build.opensuse.org/request/show/1071929 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/breeze?expand=0&rev=404 --- breeze-5.27.2.tar.xz | 3 --- breeze-5.27.2.tar.xz.sig | 16 ---------------- breeze-5.27.3.tar.xz | 3 +++ breeze-5.27.3.tar.xz.sig | 16 ++++++++++++++++ breeze.changes | 11 +++++++++++ breeze.spec | 2 +- 6 files changed, 31 insertions(+), 20 deletions(-) delete mode 100644 breeze-5.27.2.tar.xz delete mode 100644 breeze-5.27.2.tar.xz.sig create mode 100644 breeze-5.27.3.tar.xz create mode 100644 breeze-5.27.3.tar.xz.sig diff --git a/breeze-5.27.2.tar.xz b/breeze-5.27.2.tar.xz deleted file mode 100644 index a0276b4..0000000 --- a/breeze-5.27.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:145d0ac48a41d0589827b5ce5a3f4e653d1d39a67c645935d02ada62254559aa -size 87590000 diff --git a/breeze-5.27.2.tar.xz.sig b/breeze-5.27.2.tar.xz.sig deleted file mode 100644 index cb0e720..0000000 --- a/breeze-5.27.2.tar.xz.sig +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEE4KPrIC+OV1KOE+cv11dEg7tXsY0FAmP98FsACgkQ11dEg7tX -sY1u6w//XTyVf6DuMk3wvPCd0GWGXQdpNHz9jX9JTO9IwfbwURyoXmppemQ+whCy -8VbBmRNOSkWmyISdLf4LyfNTUoZBRap6/v+E6XIxalsDRsKIFAhv7rmI3AcXeqCE -fIZPSiH6ydwLd03beoJ5OsutSjEaVvdNT3BsLSdq1lHtR5N084zJnK9aKLG00+4h -saY6+4Dr1lOgJG7lt+MORWmZ8qCvOou2XzQ+eSfx5H0R3WBSbgl7bKC+sTb0qD2c -XBDk+wwWm8xxZnzGk8HAa1ErRzw4CsrewVIoobkNumTbVW29DJdh+heF6KE478EO -tpaq1G0kM0a8RbbFzz9DWvhdg6yrY40sH6FhiwSAltbYbG7PKF1OVzSwCwE+ovDp -RmU2HwPu1P40XUcF+fQPWEXMdmnVd/o4t4XBGL8QNAJDcuv8imPf0eujRrelSMfL -vIrW+0VBV+RbSS0YmqHPq4CIV8ao1PYn0I8GCsgtd/eqf4ZFgf8tSXCTMW5qaoHp -cT8RldqvLMIRxRdBD4g9MMFbXm0F07P6d0UuPFCVCMFQYIYKQkRl2T5mBUePAnle -7OXBVdi3LnYslaDKYI7E46ogq5LtOLIjgjsGuxJyhx2vT0J+v+2xivXZxrpXRjER -BwHyhEeG8z6goTJYly2AyHU836W2KrUErtkdRRgHpcO2wxnF0TA= -=G7oC ------END PGP SIGNATURE----- diff --git a/breeze-5.27.3.tar.xz b/breeze-5.27.3.tar.xz new file mode 100644 index 0000000..4258986 --- /dev/null +++ b/breeze-5.27.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7764f5bcce91e487c8756ab7c0d8a14d2bc36f97c8c33f82a70d81380e78798a +size 87590152 diff --git a/breeze-5.27.3.tar.xz.sig b/breeze-5.27.3.tar.xz.sig new file mode 100644 index 0000000..392381e --- /dev/null +++ b/breeze-5.27.3.tar.xz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE4KPrIC+OV1KOE+cv11dEg7tXsY0FAmQQZpEACgkQ11dEg7tX +sY3RZxAAhiIx7+xmUwyJd6kuDYrgnnEzJrc/OMRQgJwBA/DAacwV19500fG5nG6H +iy1r7vrjsDzMz0T121HXTZ1m3MONMhy3E2g8w2hhpLcFs+7kniuuncO1wC5oGfZj +lLE71LToADn1eGhyLI6hr0gGlw7/WfQGKGFiT5M53gqafRUwxFIMKqKwiwEXo+8G +AifZ4+mad77qwr+RSbxBYS2x4R/H7MvrrYQuLvHbEzmiqN2Bp8wx6ejArAeqGQwb +kg01HGk4xoYDeA7aQ5q+UzpMtN0v1Iz/hRQVHojJY1bUz/3neXh0auLyTt7Zzk5t +PpJ+9nRjCxjvSRmlitB3F4gOmSpJxrjeivzTEtULPIV8ul0AJMzxoGAf1UpZctb4 +VlODh7GAwfEmZ328zz0AVwT3i8KRXP7aiwsXimB0OfaQ0qJTmAfdaQc/ZU5kf720 +9IFSfXj6zUTedRYgxkorZQBct4cGhUgMsOtNEaKvVWSR++0/tnC10XWpFTJYs7ZH +v+d7ZWagbVztefvd5k9ENK4jzlUr647AjmCgNnb5VOH5zyqE0rsE+2yFZHvXSUD+ +PyA8/gGUGukAkF9mIyPFZL5rIn2aOZ/33cZP4yhTLAgnl8Js6vKk+WICy4NPKInS +qIX5r3PA2GMbqdMXhsGC+uHWWRrJ7dfa3o30IxQB/zOD+x4SRTk= +=QnT2 +-----END PGP SIGNATURE----- diff --git a/breeze.changes b/breeze.changes index d3a9348..1a1ea1c 100644 --- a/breeze.changes +++ b/breeze.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Mar 14 15:05:46 UTC 2023 - Fabian Vogt + +- Update to 5.27.3 + * New bugfix release + * For more details please see: + * https://kde.org/announcements/plasma/5/5.27.3 +- Changes since 5.27.2: + * Setting height before adding margins + * Calling expandSize in flat comboboxes too + ------------------------------------------------------------------- Tue Feb 28 17:34:14 UTC 2023 - Fabian Vogt diff --git a/breeze.spec b/breeze.spec index 62abea0..de6f30a 100644 --- a/breeze.spec +++ b/breeze.spec @@ -22,7 +22,7 @@ %{!?_plasma5_version: %define _plasma5_version %(echo %{_plasma5_bugfix} | awk -F. '{print $1"."$2}')} %bcond_without released Name: breeze -Version: 5.27.2 +Version: 5.27.3 Release: 0 Summary: Plasma Desktop artwork, styles and assets License: GPL-2.0-or-later From c58a477c5d9d17fa5f0c7119fa443928a7c6a528085b5a47361a2b9ee8fadf4c Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Thu, 16 Mar 2023 21:02:35 +0000 Subject: [PATCH 2/2] Accepting request 1072483 from home:Vogtinator:plasma5.27 - Add patches to make the window outline configurable (kde#465948): * 0001-Outline-intensity-setting.patch * 0002-Undo-some-string-changes-from-the-preceding-commit.patch OBS-URL: https://build.opensuse.org/request/show/1072483 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/breeze?expand=0&rev=405 --- 0001-Outline-intensity-setting.patch | 320 ++++++++++++++++++ ...ng-changes-from-the-preceding-commit.patch | 52 +++ breeze.changes | 7 + breeze.spec | 4 + 4 files changed, 383 insertions(+) create mode 100644 0001-Outline-intensity-setting.patch create mode 100644 0002-Undo-some-string-changes-from-the-preceding-commit.patch diff --git a/0001-Outline-intensity-setting.patch b/0001-Outline-intensity-setting.patch new file mode 100644 index 0000000..e02bd26 --- /dev/null +++ b/0001-Outline-intensity-setting.patch @@ -0,0 +1,320 @@ +From edc3b64ac4ff06a2213e2a34a78b75287295387b Mon Sep 17 00:00:00 2001 +From: Akseli Lahtinen +Date: Fri, 3 Mar 2023 20:51:47 +0000 +Subject: [PATCH 1/2] Outline intensity setting + +This MR adds a tiny outline intensity combobox to Breeze settings in the Shadow tab. +I chose shadow tab since the outline is drawn in the shadow drawcall, +so maybe this will help people realise it's not part of the borders. + +BUG: 465948 +FIXED-IN: 6.0 + +--- + +Here's examples with default breeze dark theme + +Off + +![Screenshot_20230302_181427](/uploads/22145f9d7b336f5437a4953933c4ab4d/Screenshot_20230302_181427.png) + +Low + +![Screenshot_20230302_181459](/uploads/807e3fb887e73a6fcd7c6cd70c713b26/Screenshot_20230302_181459.png) + +Medium + +![Screenshot_20230302_181437](/uploads/a14485ccbc0c2c6e7fc020972f96ab94/Screenshot_20230302_181437.png) + +High + +![Screenshot_20230302_181510](/uploads/30141d08ed9eb48eae4bba13c37db2fd/Screenshot_20230302_181510.png) + +Maximum + +![Screenshot_20230302_181452](/uploads/2eeb591d95a296adfa2daee4a985351e/Screenshot_20230302_181452.png) + +Currently the effect only appears after pressing OK. This is same with all the Breeze window decoration settings afaik. + +_Also, dont mind the settings window having same outline at the same time in the images: I'm not using the dev environment so it doesnt affect anything outside of the preview image. In dev env it changes everywhere._ + +(cherry picked from commit 9b93fb968ed6a2817cee367aab5cfef7003b4073) +--- + kdecoration/breezedecoration.cpp | 82 ++++++++++++------- + kdecoration/breezesettingsdata.kcfg | 10 +++ + kdecoration/config/breezeconfigwidget.cpp | 12 +++ + .../config/ui/breezeconfigurationui.ui | 52 ++++++++++-- + 4 files changed, 121 insertions(+), 35 deletions(-) + +diff --git a/kdecoration/breezedecoration.cpp b/kdecoration/breezedecoration.cpp +index cc5bb75d..410943f2 100644 +--- a/kdecoration/breezedecoration.cpp ++++ b/kdecoration/breezedecoration.cpp +@@ -111,6 +111,25 @@ inline CompositeShadowParams lookupShadowParams(int size) + return s_shadowParams[3]; + } + } ++ ++inline int lookupOutlineIntensity(int intensity) ++{ ++ switch (intensity) { ++ case Breeze::InternalSettings::OutlineOff: ++ return 100; ++ case Breeze::InternalSettings::OutlineLow: ++ return 130; ++ case Breeze::InternalSettings::OutlineMedium: ++ return 170; ++ case Breeze::InternalSettings::OutlineHigh: ++ return 210; ++ case Breeze::InternalSettings::OutlineMaximum: ++ return 250; ++ default: ++ // Fallback to the Medium intensity. ++ return 170; ++ } ++} + } + + namespace Breeze +@@ -743,7 +762,8 @@ void Decoration::updateShadow() + outlineColor.hslSaturationF(), + qBound(0.1, outlineColor.lightnessF(), 1.0), + s->isAlphaChannelSupported() ? 0.9 : 1.0); +- outlineColor.lightnessF() >= 0.5 ? outlineColor = outlineColor.darker(170) : outlineColor = outlineColor.lighter(170); ++ outlineColor.lightnessF() >= 0.5 ? outlineColor = outlineColor.darker(lookupOutlineIntensity(m_internalSettings->outlineIntensity())) ++ : outlineColor = outlineColor.lighter(lookupOutlineIntensity(m_internalSettings->outlineIntensity())); + + // Animated case, no cached shadow object + if ((m_shadowAnimation->state() == QAbstractAnimation::Running) && (m_shadowOpacity != 0.0) && (m_shadowOpacity != 1.0)) { +@@ -821,36 +841,38 @@ QSharedPointer Decoration::createShadowObject(co + painter.drawRoundedRect(innerRect, m_scaledCornerRadius + 0.5, m_scaledCornerRadius + 0.5); + + // Draw window outline +- const qreal outlineWidth = 1.001; +- const qreal penOffset = outlineWidth / 2; +- +- QRectF outlineRect = innerRect + QMarginsF(penOffset, penOffset, penOffset, penOffset); +- qreal cornerSize = m_scaledCornerRadius * 2; +- QRectF cornerRect(outlineRect.x(), outlineRect.y(), cornerSize, cornerSize); +- QPainterPath outlinePath; +- +- outlinePath.arcMoveTo(cornerRect, 180); +- outlinePath.arcTo(cornerRect, 180, -90); +- cornerRect.moveTopRight(outlineRect.topRight()); +- outlinePath.arcTo(cornerRect, 90, -90); +- +- // Check if border size is "no borders" or "no side-borders" +- if (borderSize(true) == 0) { +- outlinePath.lineTo(outlineRect.bottomRight()); +- outlinePath.lineTo(outlineRect.bottomLeft()); +- } else { +- cornerRect.moveBottomRight(outlineRect.bottomRight()); +- outlinePath.arcTo(cornerRect, 0, -90); +- cornerRect.moveBottomLeft(outlineRect.bottomLeft()); +- outlinePath.arcTo(cornerRect, 270, -90); +- } +- outlinePath.closeSubpath(); ++ if (lookupOutlineIntensity(m_internalSettings->outlineIntensity()) > 100) { ++ const qreal outlineWidth = 1.001; ++ const qreal penOffset = outlineWidth / 2; ++ ++ QRectF outlineRect = innerRect + QMarginsF(penOffset, penOffset, penOffset, penOffset); ++ qreal cornerSize = m_scaledCornerRadius * 2; ++ QRectF cornerRect(outlineRect.x(), outlineRect.y(), cornerSize, cornerSize); ++ QPainterPath outlinePath; ++ ++ outlinePath.arcMoveTo(cornerRect, 180); ++ outlinePath.arcTo(cornerRect, 180, -90); ++ cornerRect.moveTopRight(outlineRect.topRight()); ++ outlinePath.arcTo(cornerRect, 90, -90); ++ ++ // Check if border size is "no borders" or "no side-borders" ++ if (borderSize(true) == 0) { ++ outlinePath.lineTo(outlineRect.bottomRight()); ++ outlinePath.lineTo(outlineRect.bottomLeft()); ++ } else { ++ cornerRect.moveBottomRight(outlineRect.bottomRight()); ++ outlinePath.arcTo(cornerRect, 0, -90); ++ cornerRect.moveBottomLeft(outlineRect.bottomLeft()); ++ outlinePath.arcTo(cornerRect, 270, -90); ++ } ++ outlinePath.closeSubpath(); + +- painter.setPen(QPen(outlineColor, outlineWidth)); +- painter.setBrush(Qt::NoBrush); +- painter.setCompositionMode(QPainter::CompositionMode_Source); +- painter.setRenderHint(QPainter::Antialiasing); +- painter.drawPath(outlinePath); ++ painter.setPen(QPen(outlineColor, outlineWidth)); ++ painter.setBrush(Qt::NoBrush); ++ painter.setCompositionMode(QPainter::CompositionMode_Source); ++ painter.setRenderHint(QPainter::Antialiasing); ++ painter.drawPath(outlinePath); ++ } + + painter.end(); + +diff --git a/kdecoration/breezesettingsdata.kcfg b/kdecoration/breezesettingsdata.kcfg +index f57f61fe..559983d7 100644 +--- a/kdecoration/breezesettingsdata.kcfg ++++ b/kdecoration/breezesettingsdata.kcfg +@@ -35,6 +35,16 @@ + false + + ++ ++ ++ ++ ++ ++ ++ ++ ++ OutlineMedium ++ + + + +diff --git a/kdecoration/config/breezeconfigwidget.cpp b/kdecoration/config/breezeconfigwidget.cpp +index f75e1b3b..d57c0846 100644 +--- a/kdecoration/config/breezeconfigwidget.cpp ++++ b/kdecoration/config/breezeconfigwidget.cpp +@@ -38,6 +38,7 @@ ConfigWidget::ConfigWidget(QWidget *parent, const QVariantList &args) + connect(m_ui.shadowSize, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged())); + connect(m_ui.shadowStrength, SIGNAL(valueChanged(int)), SLOT(updateChanged())); + connect(m_ui.shadowColor, &KColorButton::changed, this, &ConfigWidget::updateChanged); ++ connect(m_ui.outlineIntensity, SIGNAL(valueChanged(int)), SLOT(updateChanged())); + + // track exception changes + connect(m_ui.exceptions, &ExceptionListWidget::changed, this, &ConfigWidget::updateChanged); +@@ -70,6 +71,13 @@ void ConfigWidget::load() + m_ui.shadowStrength->setValue(qRound(qreal(m_internalSettings->shadowStrength() * 100) / 255)); + m_ui.shadowColor->setColor(m_internalSettings->shadowColor()); + ++ // load outline intensity ++ if (m_internalSettings->outlineIntensity() <= InternalSettings::OutlineMaximum) { ++ m_ui.outlineIntensity->setCurrentIndex(m_internalSettings->outlineIntensity()); ++ } else { ++ m_ui.outlineIntensity->setCurrentIndex(InternalSettings::OutlineMedium); ++ } ++ + // load exceptions + ExceptionList exceptions; + exceptions.readConfig(m_configuration); +@@ -94,6 +102,7 @@ void ConfigWidget::save() + m_internalSettings->setShadowSize(m_ui.shadowSize->currentIndex()); + m_internalSettings->setShadowStrength(qRound(qreal(m_ui.shadowStrength->value() * 255) / 100)); + m_internalSettings->setShadowColor(m_ui.shadowColor->color()); ++ m_internalSettings->setOutlineIntensity(m_ui.outlineIntensity->currentIndex()); + + // save configuration + m_internalSettings->save(); +@@ -136,6 +145,7 @@ void ConfigWidget::defaults() + m_ui.shadowSize->setCurrentIndex(m_internalSettings->shadowSize()); + m_ui.shadowStrength->setValue(qRound(qreal(m_internalSettings->shadowStrength() * 100) / 255)); + m_ui.shadowColor->setColor(m_internalSettings->shadowColor()); ++ m_ui.outlineIntensity->setCurrentIndex(m_internalSettings->outlineIntensity()); + } + + //_______________________________________________ +@@ -167,6 +177,8 @@ void ConfigWidget::updateChanged() + modified = true; + } else if (m_ui.shadowColor->color() != m_internalSettings->shadowColor()) { + modified = true; ++ } else if (m_ui.outlineIntensity->currentIndex() != m_internalSettings->outlineIntensity()) { ++ modified = true; + + // exceptions + } else if (m_ui.exceptions->isChanged()) { +diff --git a/kdecoration/config/ui/breezeconfigurationui.ui b/kdecoration/config/ui/breezeconfigurationui.ui +index f29e38c1..a760f7b7 100644 +--- a/kdecoration/config/ui/breezeconfigurationui.ui ++++ b/kdecoration/config/ui/breezeconfigurationui.ui +@@ -193,13 +193,13 @@ + + + +- Shadows ++ Shadows and Outline + + + + + +- Si&ze: ++ Shadow size: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +@@ -241,7 +241,7 @@ + + + +- S&trength: ++ Shadow strength: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +@@ -280,7 +280,7 @@ + + + +- Color: ++ Shadow color: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +@@ -290,7 +290,49 @@ + + + +- ++ ++ ++ ++ Outline intensity: ++ ++ ++ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter ++ ++ ++ outlineIntensity ++ ++ ++ ++ ++ ++ ++ ++ Off ++ ++ ++ ++ ++ Low ++ ++ ++ ++ ++ Medium ++ ++ ++ ++ ++ High ++ ++ ++ ++ ++ Maximum ++ ++ ++ ++ ++ + + + Qt::Vertical +-- +2.39.2 + diff --git a/0002-Undo-some-string-changes-from-the-preceding-commit.patch b/0002-Undo-some-string-changes-from-the-preceding-commit.patch new file mode 100644 index 0000000..a1edbc3 --- /dev/null +++ b/0002-Undo-some-string-changes-from-the-preceding-commit.patch @@ -0,0 +1,52 @@ +From 9bdf353d8cbce8d602ce799ab56179861888629f Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Thu, 16 Mar 2023 21:43:33 +0100 +Subject: [PATCH 2/2] Undo some string changes from the preceding commit + +To avoid breaking translations, revert some not really necessary string +changes. Makes the option a bit harder to find though. +--- + kdecoration/config/ui/breezeconfigurationui.ui | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/kdecoration/config/ui/breezeconfigurationui.ui b/kdecoration/config/ui/breezeconfigurationui.ui +index a760f7b7..e0283c93 100644 +--- a/kdecoration/config/ui/breezeconfigurationui.ui ++++ b/kdecoration/config/ui/breezeconfigurationui.ui +@@ -193,13 +193,13 @@ + + + +- Shadows and Outline ++ Shadows + + + + + +- Shadow size: ++ Si&ze: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +@@ -241,7 +241,7 @@ + + + +- Shadow strength: ++ S&trength: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +@@ -280,7 +280,7 @@ + + + +- Shadow color: ++ Color: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +-- +2.39.2 + diff --git a/breeze.changes b/breeze.changes index 1a1ea1c..58929fe 100644 --- a/breeze.changes +++ b/breeze.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 16 20:52:25 UTC 2023 - Fabian Vogt + +- Add patches to make the window outline configurable (kde#465948): + * 0001-Outline-intensity-setting.patch + * 0002-Undo-some-string-changes-from-the-preceding-commit.patch + ------------------------------------------------------------------- Tue Mar 14 15:05:46 UTC 2023 - Fabian Vogt diff --git a/breeze.spec b/breeze.spec index de6f30a..7c110a8 100644 --- a/breeze.spec +++ b/breeze.spec @@ -33,6 +33,10 @@ Source: https://download.kde.org/stable/plasma/%{version}/breeze-%{versi Source1: https://download.kde.org/stable/plasma/%{version}/breeze-%{version}.tar.xz.sig Source2: plasma.keyring %endif +# PATCH-FEATURE-UPSTREAM +Patch100: 0001-Outline-intensity-setting.patch +# PATCH-FIX-OPENSUSE for ^ +Patch101: 0002-Undo-some-string-changes-from-the-preceding-commit.patch BuildRequires: cmake >= 3.16 BuildRequires: extra-cmake-modules >= 5.98.0 BuildRequires: fdupes