[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#859326: unblock: kconfigwidgets/5.28.0-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Dear release team,

I've backported a fix in kconfigwidgets for stretch that I consider is 
important because it fixes notable UX inconsistency:
 KColorScheme: default to application scheme if set by KColorSchemeManager
 (a3355b2) KDE#373764
 ...
 This patch makes KColorScheme() match the application scheme by default when
 this differs from the system scheme, which seems preferable to adding the
 same code in hundreds of callers.

And uploaded 5.28.0-2 with it.

I'm attaching the corresponding debdiff, the version 5.28.0-2 is already in 
sid, and built in all the release archs.

Happy hacking,

Please unblock package kconfigwidgets

unblock kconfigwidgets/5.28.0-2

- -- System Information:
Debian Release: 9.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'testing'), (500, 'stable'), (50, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf

Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEE+JIdOnQEyG4RNSIVxxl2mbKbIyoFAljgya4QHG1heHlAZGVi
aWFuLm9yZwAKCRDHGXaZspsjKsPVD/9OUZngZtwL5kphzMoTkOALBWZ25pTwwPNC
fgBvRTvBEZxIOG6wBhlMqgcnSvh8ffUBXOgoibe6lpP8BzWbam5R9j/9/ZnWSD++
FtWPJYBH6ZFLg1nfTEu5O1CxvRt6KjRrZrBuqtLJcVbSRO1NSBIeui2ioApFCKsP
MqGpjG6/L4QxFnSltAbwYfTPkZgKK2zTXbjR2jdzjcZtT/GXqryUd4khWTyNfgH4
ZBTcSPHECMELpTh71646yw5NeRnTaSBSaOtnnFULslyapkD6KSgwoYDHUX9aSxE/
IoF9XengYQOnW5+3fXLbRZddxSH0uFm5FXNqJ6wYn7aTRxXzO5NXkiymX69WAOmo
8tCt4fbtMQEIuLomgO+MFgMGOEnrB6075MwWZqAGI5sDxlw882wuNKbouyZ2MBDS
cbytAnEP8n8krCZkW7y+WP+4BGfrVRrsmyQj/xEBgx4x+YiylXTPUJEYIZEgXVzL
I5dmUI6/BKBwfAobwTHT+PWTAdUCoUSbSQEl2Iszu5IAROM89vNYNG3Oxkb/5iaP
hefxEg6Jl7EG03TFE/1jq9XdH9nNRbdJgskggi9btgIuoX28kShIeCePsAcdzVOw
TKmAxpKSI7ykJByAY6N5fER+C3GdyxdNTkkFUcoQDSdQFtmPptSslf8vx/c2gutC
WKk+cGHabg==
=mt1h
-----END PGP SIGNATURE-----
diff -Nru kconfigwidgets-5.28.0/debian/changelog kconfigwidgets-5.28.0/debian/changelog
--- kconfigwidgets-5.28.0/debian/changelog	2016-11-18 16:04:45.000000000 +0100
+++ kconfigwidgets-5.28.0/debian/changelog	2017-03-31 15:26:18.000000000 +0200
@@ -1,3 +1,10 @@
+kconfigwidgets (5.28.0-2) unstable; urgency=medium
+
+  * Add new upstream patch:
+    KColorScheme-default-to-application-scheme-if-set-by-KCol.patch
+
+ -- Maximiliano Curia <maxy@debian.org>  Fri, 31 Mar 2017 15:26:18 +0200
+
 kconfigwidgets (5.28.0-1) unstable; urgency=medium
 
   [ Automatic packaging ]
diff -Nru kconfigwidgets-5.28.0/debian/patches/KColorScheme-default-to-application-scheme-if-set-by-KCol.patch kconfigwidgets-5.28.0/debian/patches/KColorScheme-default-to-application-scheme-if-set-by-KCol.patch
--- kconfigwidgets-5.28.0/debian/patches/KColorScheme-default-to-application-scheme-if-set-by-KCol.patch	1970-01-01 01:00:00.000000000 +0100
+++ kconfigwidgets-5.28.0/debian/patches/KColorScheme-default-to-application-scheme-if-set-by-KCol.patch	2017-03-31 15:26:18.000000000 +0200
@@ -0,0 +1,181 @@
+From: Francis Herne <mail@flherne.uk>
+Date: Sun, 19 Feb 2017 20:01:38 +0000
+Subject: KColorScheme: default to application scheme if set by
+ KColorSchemeManager
+
+KColorSchemeManager::activateScheme() sets a custom path for the
+application's color scheme, with
+`qApp->setProperty("KDE_COLOR_SCHEME_PATH", index.data(Qt::UserRole));`
+
+Currently, the KColorScheme() and KStatefulBrush() constructors will
+ ignore this and use only the system color scheme, unless an
+ application-specific config is explicitly loaded and passed in by the
+ caller.
+This is problematic, because most callers assume that the default is to
+ match the *application* scheme - usually this is equivalent, but it
+ differs when KColorSchemeManager is used.
+
+For example, when the application of a KTextEditor widget or
+ KonsolePart has an opposite color scheme to the system, the Find bars
+ are unreadable.
+BUG: 373764
+
+This patch makes KColorScheme() match the application scheme by default
+ when this differs from the system scheme, which seems preferable to
+ adding the same code in hundreds of callers.
+
+Differential Revision: https://phabricator.kde.org/D4637
+---
+ src/kcolorscheme.cpp | 13 ++++++++++---
+ src/kcolorscheme.h   | 30 ++++++++++++++++--------------
+ 2 files changed, 26 insertions(+), 17 deletions(-)
+
+diff --git a/src/kcolorscheme.cpp b/src/kcolorscheme.cpp
+index ba18d8e..9405b72 100644
+--- a/src/kcolorscheme.cpp
++++ b/src/kcolorscheme.cpp
+@@ -26,6 +26,7 @@
+ #include <QColor>
+ #include <QBrush>
+ #include <QWidget>
++#include <QCoreApplication>
+ 
+ //BEGIN StateEffects
+ class StateEffects
+@@ -250,6 +251,12 @@ static const DecoDefaultColors defaultDecorationColors = {
+ };
+ //END default colors
+ 
++KSharedConfigPtr defaultConfig() {
++    // Read from the application's color scheme file (as set by KColorSchemeManager).
++    // If unset, this is equivalent to openConfig() and the system scheme is used.
++    return KSharedConfig::openConfig(qApp->property("KDE_COLOR_SCHEME_PATH").toString());
++}
++
+ //BEGIN KColorSchemePrivate
+ class KColorSchemePrivate : public QSharedData
+ {
+@@ -431,7 +438,7 @@ KColorScheme::~KColorScheme()
+ KColorScheme::KColorScheme(QPalette::ColorGroup state, ColorSet set, KSharedConfigPtr config)
+ {
+     if (!config) {
+-        config = KSharedConfig::openConfig();
++        config = defaultConfig();
+     }
+ 
+     switch (set) {
+@@ -662,7 +669,7 @@ KStatefulBrush::KStatefulBrush(KColorScheme::ColorSet set, KColorScheme::Decorat
+ KStatefulBrush::KStatefulBrush(const QBrush &brush, KSharedConfigPtr config)
+ {
+     if (!config) {
+-        config = KSharedConfig::openConfig();
++        config = defaultConfig();
+     }
+     d = new KStatefulBrushPrivate[3];
+     d[0] = brush;
+@@ -674,7 +681,7 @@ KStatefulBrush::KStatefulBrush(const QBrush &brush, const QBrush &background,
+                                KSharedConfigPtr config)
+ {
+     if (!config) {
+-        config = KSharedConfig::openConfig();
++        config = defaultConfig();
+     }
+     d = new KStatefulBrushPrivate[3];
+     d[0] = brush;
+diff --git a/src/kcolorscheme.h b/src/kcolorscheme.h
+index 2dced8e..fe636d5 100644
+--- a/src/kcolorscheme.h
++++ b/src/kcolorscheme.h
+@@ -312,8 +312,9 @@ public:
+     KColorScheme &operator=(const KColorScheme &);
+ 
+     /**
+-     * Construct a palette from given color set and state, using the colors
+-     * from the given KConfig (if null, the system colors are used).
++     * Construct a palette from given color set and state. Colors are taken
++     * from the given KConfig. If null, the application's color scheme is used
++     *  (either the system default or one set by KColorSchemeManager).
+      *
+      * @note KColorScheme provides direct access to the color scheme for users
+      * that deal directly with widget states. Unless you are a low-level user
+@@ -342,8 +343,7 @@ public:
+      * Retrieve the requested shade color, using
+      * KColorScheme::background(KColorScheme::NormalBackground)
+      * as the base color and the contrast setting from the KConfig used to
+-     * create this KColorScheme instance (the system contrast setting, if no
+-     * KConfig was specified).
++     * create this KColorScheme instance.
+      *
+      * @note Shades are chosen such that all shades would contrast with the
+      * base color. This means that if base is very dark, the 'dark' shades will
+@@ -363,7 +363,8 @@ public:
+     /**
+      * Returns the contrast for borders as a floating point value.
+      * @param config pointer to the config from which to read the contrast
+-     * setting (the default is to use KSharedConfig::openConfig())
++     * setting. If null, the application's color scheme will be used
++     *   (either the system default or one set by KColorSchemeManager).
+      * @return the contrast (between 0.0 for minimum and 1.0 for maximum
+      *         contrast)
+      */
+@@ -371,7 +372,7 @@ public:
+ 
+     /**
+      * Retrieve the requested shade color, using the specified color as the
+-     * base color and the system contrast setting.
++     * base color and the application's contrast setting.
+      *
+      * @note Shades are chosen such that all shades would contrast with the
+      * base color. This means that if base is very dark, the 'dark' shades will
+@@ -483,8 +484,9 @@ public:
+ 
+     /**
+      * Construct a stateful brush from given color set and foreground role,
+-     * using the colors from the given KConfig (if null, the system colors are
+-     * used).
++     * using the colors from the given KConfig.
++     * If null, the application's color scheme is used (either the system
++     * default, or one set by KColorSchemeManager).
+      */
+     explicit KStatefulBrush(KColorScheme::ColorSet,
+                             KColorScheme::ForegroundRole,
+@@ -492,8 +494,8 @@ public:
+ 
+     /**
+      * Construct a stateful brush from given color set and background role,
+-     * using the colors from the given KConfig (if null, the system colors are
+-     * used).
++     * using the colors from the given KConfig (if null, the application's
++     * colors are used).
+      */
+     explicit KStatefulBrush(KColorScheme::ColorSet,
+                             KColorScheme::BackgroundRole,
+@@ -501,8 +503,8 @@ public:
+ 
+     /**
+      * Construct a stateful brush from given color set and decoration role,
+-     * using the colors from the given KConfig (if null, the system colors are
+-     * used).
++     * using the colors from the given KConfig (if null, the application's
++     * colors are used).
+      */
+     explicit KStatefulBrush(KColorScheme::ColorSet,
+                             KColorScheme::DecorationRole,
+@@ -514,7 +516,7 @@ public:
+      * determined from the base QBrush (which fills in the Active state)
+      * according to the same rules used to build stateful color schemes from
+      * the system color scheme. The state effects from the given KConfig are
+-     * used (if null, the system state effects are used).
++     * used (if null, the application's state effects are used).
+      */
+     explicit KStatefulBrush(const QBrush &, KSharedConfigPtr = KSharedConfigPtr());
+ 
+@@ -524,7 +526,7 @@ public:
+      * states are determined from the base QBrush (which fills in the Active
+      * state) according to the same rules used to build stateful color schemes
+      * from the system color scheme. The state effects from the given KConfig
+-     * are used (if null, the system state effects are used).
++     * are used (if null, the application's state effects are used).
+      *
+      * @param background The background brush (or color) corresponding to the
+      * KColorScheme::NormalBackground role and QPalette::Active state for this
diff -Nru kconfigwidgets-5.28.0/debian/patches/series kconfigwidgets-5.28.0/debian/patches/series
--- kconfigwidgets-5.28.0/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ kconfigwidgets-5.28.0/debian/patches/series	2017-03-31 15:26:18.000000000 +0200
@@ -0,0 +1 @@
+KColorScheme-default-to-application-scheme-if-set-by-KCol.patch

Reply to: