Hello community,

here is the log from the commit of package kiconthemes for openSUSE:Factory 
checked in at 2017-10-27 13:55:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kiconthemes (Old)
 and      /work/SRC/openSUSE:Factory/.kiconthemes.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kiconthemes"

Fri Oct 27 13:55:20 2017 rev:49 rq:536327 version:5.39.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kiconthemes/kiconthemes.changes  2017-09-19 
16:24:01.533966208 +0200
+++ /work/SRC/openSUSE:Factory/.kiconthemes.new/kiconthemes.changes     
2017-10-27 13:55:22.348982488 +0200
@@ -1,0 +2,14 @@
+Mon Oct 23 06:41:40 CEST 2017 - [email protected]
+
+- Update to 5.39.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.39.0.php
+- Changes since 5.38.0:
+  * add a method to reset the custom palette
+  * use qApp->palette() when no custom one is set
+  * allocate the proper buffer size
+  * allow to set a custom palette instead of colorSets
+  * expose the colorset for the stylesheet
+
+-------------------------------------------------------------------

Old:
----
  kiconthemes-5.38.0.tar.xz

New:
----
  kiconthemes-5.39.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kiconthemes.spec ++++++
--- /var/tmp/diff_new_pack.65hsxj/_old  2017-10-27 13:55:23.040950143 +0200
+++ /var/tmp/diff_new_pack.65hsxj/_new  2017-10-27 13:55:23.044949957 +0200
@@ -18,13 +18,13 @@
 
 %bcond_without lang
 %define lname   libKF5IconThemes5
-%define _tar_path 5.38
+%define _tar_path 5.39
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 Name:           kiconthemes
-Version:        5.38.0
+Version:        5.39.0
 Release:        0
 %define kf5_version %{version}
 BuildRequires:  cmake >= 3.0

++++++ kiconthemes-5.38.0.tar.xz -> kiconthemes-5.39.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.38.0/CMakeLists.txt 
new/kiconthemes-5.39.0/CMakeLists.txt
--- old/kiconthemes-5.38.0/CMakeLists.txt       2017-09-03 10:07:36.000000000 
+0200
+++ new/kiconthemes-5.39.0/CMakeLists.txt       2017-10-07 21:16:00.000000000 
+0200
@@ -1,12 +1,12 @@
 cmake_minimum_required(VERSION 3.0)
 
-set(KF5_VERSION "5.38.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.38.0") # handled by release scripts
+set(KF5_VERSION "5.39.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.39.0") # handled by release scripts
 project(KIconThemes VERSION ${KF5_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.38.0  NO_MODULE)
+find_package(ECM 5.39.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.38.0/po/zh_CN/kiconthemes5.po 
new/kiconthemes-5.39.0/po/zh_CN/kiconthemes5.po
--- old/kiconthemes-5.38.0/po/zh_CN/kiconthemes5.po     2017-09-03 
10:07:36.000000000 +0200
+++ new/kiconthemes-5.39.0/po/zh_CN/kiconthemes5.po     2017-10-07 
21:16:00.000000000 +0200
@@ -1,9 +1,23 @@
+# translation of kio4.po to 简体中文
+# Copyright (C) 2007 Free Software Foundation, Inc.
+#
+#
+# Wang Jian <[email protected]>, 1998.
+# Sarah Smith <[email protected]>, 2002.
+# Xiong Jiang <[email protected]>, 2002,2003.
+# Funda Wang <[email protected]>, 2002,2003,2004.
+# Liang Qi <[email protected]>, 2007.
+# Ni Hui <[email protected]>, 2009, 2010, 2011, 2012.
+# Feng Chao <[email protected]>, 2010, 2012, 2013.
+# Lie Ex <[email protected]>, 2007-2010.
+# Weng Xuetian <[email protected]>, 2011, 2012.
+# Guo Yunhe <[email protected]>, 2016.
 msgid ""
 msgstr ""
 "Project-Id-Version: kdeorg\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
 "POT-Creation-Date: 2016-11-19 20:11+0100\n"
-"PO-Revision-Date: 2017-08-31 05:10-0400\n"
+"PO-Revision-Date: 2017-09-30 17:44-0400\n"
 "Last-Translator: guoyunhebrave <[email protected]>\n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.38.0/src/kiconloader.cpp 
new/kiconthemes-5.39.0/src/kiconloader.cpp
--- old/kiconthemes-5.38.0/src/kiconloader.cpp  2017-09-03 10:07:36.000000000 
+0200
+++ new/kiconthemes-5.39.0/src/kiconloader.cpp  2017-10-07 21:16:00.000000000 
+0200
@@ -136,12 +136,13 @@
 
 static QString paletteId(const QPalette &pal)
 {
-    // 8 per color. We want 3 colors thus 8*3=24.
-    QString buffer(24, Qt::Uninitialized);
+    // 8 per color. We want 3 colors thus 8*4=32.
+    QString buffer(32, Qt::Uninitialized);
 
-    uintToHex(pal.text().color().rgba(), buffer.data());
+    uintToHex(pal.windowText().color().rgba(), buffer.data());
     uintToHex(pal.highlight().color().rgba(), buffer.data() + 8);
     uintToHex(pal.highlightedText().color().rgba(), buffer.data() + 16);
+    uintToHex(pal.window().color().rgba(), buffer.data() + 24);
 
     return buffer;
 }
@@ -396,6 +397,10 @@
 
     QHash<QString, bool> mIconAvailability; // icon name -> true (known to be 
available) or false (known to be unavailable)
     QElapsedTimer mLastUnknownIconCheck; // recheck for unknown icons after 
kiconloader_ms_between_checks
+    //the palette used to recolor svg icons stylesheets
+    QPalette mPalette;
+    //to keep track if we are using a custom palette or just falling back to 
qApp;
+    bool mCustomPalette = false;
 };
 
 class KIconLoaderGlobalData : public QObject
@@ -864,7 +869,7 @@
            % (group >= 0 ? mpEffect.fingerprint(group, state)
               : NULL_EFFECT_FINGERPRINT())
            % QLatin1Char('_')
-           % paletteId(qApp->palette())
+           % paletteId(mCustomPalette ? mPalette : qApp->palette())
            % (q->theme() && q->theme()->followsColorScheme() && state == 
KIconLoader::SelectedState ? QStringLiteral("_selected") : QString());
 }
 
@@ -882,7 +887,7 @@
         return QByteArray();
     }
 
-    const QPalette pal = qApp->palette();
+    const QPalette pal = mCustomPalette ? mPalette : qApp->palette();
     KColorScheme scheme(QPalette::Active, KColorScheme::Window);
     QString styleSheet = STYLESHEET_TEMPLATE().arg(
         state == KIconLoader::SelectedState ? 
pal.highlightedText().color().name() : pal.windowText().color().name(),
@@ -1781,6 +1786,23 @@
     return found;
 }
 
+void KIconLoader::setCustomPalette(const QPalette &palette)
+{
+    d->mCustomPalette = true;
+    d->mPalette = palette;
+}
+
+QPalette KIconLoader::customPalette() const
+{
+    return d->mPalette;
+}
+
+void KIconLoader::resetPalette()
+{
+    d->mCustomPalette = false;
+    d->mPalette = QPalette();
+}
+
 /*** the global icon loader ***/
 Q_GLOBAL_STATIC(KIconLoader, globalIconLoader)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.38.0/src/kiconloader.h 
new/kiconthemes-5.39.0/src/kiconloader.h
--- old/kiconthemes-5.38.0/src/kiconloader.h    2017-09-03 10:07:36.000000000 
+0200
+++ new/kiconthemes-5.39.0/src/kiconloader.h    2017-10-07 21:16:00.000000000 
+0200
@@ -459,6 +459,34 @@
     void drawOverlays(const QStringList &overlays, QPixmap &pixmap, 
KIconLoader::Group group, int state = KIconLoader::DefaultState) const;
 
     bool hasIcon(const QString &iconName) const;
+
+    /**
+     * Sets the colors for this KIconLoader.
+     * NOTE: if you set a custom palette, if you are using some colors from 
+     * application's palette, you need to track the application palette 
changes by yourself.
+     * If you no longer wish to use a custom palette, use resetPalette()
+     * @see resetPalette
+     * @since 5.38
+     */
+    void setCustomPalette(const QPalette &palette);
+
+    /**
+     * The colors that will be used for the svg stylesheet in case the
+     * loaded icons are svg-based, icons can be colored in different ways in
+     * different areas of the application
+     * @return the palette, if any, an invalid one if the user didn't set it
+     * @since 5.38
+     */
+    QPalette customPalette() const;
+
+    /**
+     * Resets the custom palette used by the KIconLoader to use the
+     * QGuiApplication::palette() again (and to follow it in case the
+     * application's palette changes)
+     * @since 5.38
+     */
+    void resetPalette();
+
 public Q_SLOTS:
     /**
      * Re-initialize the global icon loader


Reply via email to