Hello community,

here is the log from the commit of package lxqt-qtplugin for openSUSE:Factory 
checked in at 2020-11-04 18:28:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lxqt-qtplugin (Old)
 and      /work/SRC/openSUSE:Factory/.lxqt-qtplugin.new.11331 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lxqt-qtplugin"

Wed Nov  4 18:28:01 2020 rev:14 rq:845998 version:0.16.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/lxqt-qtplugin/lxqt-qtplugin.changes      
2020-06-02 14:38:13.783443740 +0200
+++ /work/SRC/openSUSE:Factory/.lxqt-qtplugin.new.11331/lxqt-qtplugin.changes   
2020-11-04 18:32:34.240123981 +0100
@@ -1,0 +2,7 @@
+Wed Nov  4 13:29:29 UTC 2020 - Michael Vetter <mvet...@suse.com>
+
+- Update to 0.16.0:
+  * Do not reset widget palettes on changing style.
+  * Support more palette colors for better customization.
+
+-------------------------------------------------------------------

Old:
----
  lxqt-qtplugin-0.15.1.tar.xz
  lxqt-qtplugin-0.15.1.tar.xz.asc

New:
----
  lxqt-qtplugin-0.16.0.tar.xz
  lxqt-qtplugin-0.16.0.tar.xz.asc

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

Other differences:
------------------
++++++ lxqt-qtplugin.spec ++++++
--- /var/tmp/diff_new_pack.Illbyo/_old  2020-11-04 18:32:34.824122686 +0100
+++ /var/tmp/diff_new_pack.Illbyo/_new  2020-11-04 18:32:34.824122686 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           lxqt-qtplugin
-Version:        0.15.1
+Version:        0.16.0
 Release:        0
 Summary:        LXQt platform integration plugin for Qt 5
 License:        LGPL-2.1-or-later
@@ -30,12 +30,13 @@
 BuildRequires:  gcc-c++
 BuildRequires:  libQt5Gui-private-headers-devel
 BuildRequires:  libexif-devel
-BuildRequires:  lxqt-build-tools-devel >= 0.7.0
+BuildRequires:  lxqt-build-tools-devel >= 0.8.0
 BuildRequires:  pkgconfig
 BuildRequires:  cmake(KF5WindowSystem)
-BuildRequires:  pkgconfig(Qt5Gui)
+BuildRequires:  pkgconfig(Qt5Gui) >= 5.12.0
 BuildRequires:  pkgconfig(Qt5UiTools)
 BuildRequires:  pkgconfig(Qt5X11Extras)
+BuildRequires:  pkgconfig(Qt5Xdg) >= 3.6.0
 BuildRequires:  pkgconfig(Qt5XdgIconLoader)
 BuildRequires:  pkgconfig(dbusmenu-qt5)
 BuildRequires:  pkgconfig(libfm-qt) >= %{version}

++++++ lxqt-qtplugin-0.15.1.tar.xz -> lxqt-qtplugin-0.16.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lxqt-qtplugin-0.15.1/CHANGELOG 
new/lxqt-qtplugin-0.16.0/CHANGELOG
--- old/lxqt-qtplugin-0.15.1/CHANGELOG  2020-05-31 14:56:21.000000000 +0200
+++ new/lxqt-qtplugin-0.16.0/CHANGELOG  2020-10-30 14:42:33.000000000 +0100
@@ -1,3 +1,8 @@
+lxqt-qtplugin-0.16.0 / 2020-11-01
+=================================
+  * Do not reset widget palettes on changing style.
+  * Support more palette colors for better customization.
+
 lxqt-qtplugin-0.15.1 / 2020-05-31
 =================================
   * Fixed Fusion's window color with Qt 5.15.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lxqt-qtplugin-0.15.1/CMakeLists.txt 
new/lxqt-qtplugin-0.16.0/CMakeLists.txt
--- old/lxqt-qtplugin-0.15.1/CMakeLists.txt     2020-05-31 14:56:21.000000000 
+0200
+++ new/lxqt-qtplugin-0.16.0/CMakeLists.txt     2020-10-30 14:42:33.000000000 
+0100
@@ -13,10 +13,10 @@
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 
 # Minimum Versions
-set(LXQTBT_MINIMUM_VERSION "0.7.0")
-set(QT_MINIMUM_VERSION "5.10.0")
-set(QTXDG_MINIMUM_VERSION "3.5.0")
-set(FMQT_MINIMUM_VERSION "0.15.0")
+set(LXQTBT_MINIMUM_VERSION "0.8.0")
+set(QT_MINIMUM_VERSION "5.12.0")
+set(QTXDG_MINIMUM_VERSION "3.6.0")
+set(FMQT_MINIMUM_VERSION "0.16.0")
 
 find_package(Qt5DBus ${QT_MINIMUM_VERSION} REQUIRED)
 find_package(Qt5LinguistTools ${QT_MINIMUM_VERSION} REQUIRED)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lxqt-qtplugin-0.15.1/src/lxqtplatformtheme.cpp 
new/lxqt-qtplugin-0.16.0/src/lxqtplatformtheme.cpp
--- old/lxqt-qtplugin-0.15.1/src/lxqtplatformtheme.cpp  2020-05-31 
14:56:21.000000000 +0200
+++ new/lxqt-qtplugin-0.16.0/src/lxqtplatformtheme.cpp  2020-10-30 
14:42:33.000000000 +0100
@@ -116,25 +116,114 @@
     // single click activation
     singleClickActivate_ = 
settings.value(QLatin1String("single_click_activate")).toBool();
 
-    // load Qt settings
-    settings.beginGroup(QLatin1String("Qt"));
+    // palette
+    settings.beginGroup(QLatin1String("Palette"));
+    paletteChanged_ = false;
 
-    // widget style
-    style_ = settings.value(QLatin1String("style"), 
QLatin1String("fusion")).toString();
-
-    // window color
-    // NOTE: Later, we might add more colors but, for now, only the window
-    // (= button) color is set, with Fusion's window color as the fallback.
-    QColor oldWinColor = winColor_;
+    QColor color = winColor_;
     winColor_.setNamedColor(settings.value(QLatin1String("window_color"), 
QLatin1String("#efefef")).toString());
     if(!winColor_.isValid())
         winColor_.setNamedColor(QStringLiteral("#efefef"));
-    if(oldWinColor != winColor_)
+    paletteChanged_ = color != winColor_;
+
+    color = baseColor_;
+    
baseColor_.setNamedColor(settings.value(QLatin1String("base_color")).toString());
+    if (!paletteChanged_)
+        paletteChanged_ = baseColor_.isValid() && color != baseColor_;
+
+    color = highlightColor_;
+    
highlightColor_.setNamedColor(settings.value(QLatin1String("highlight_color")).toString());
+    if (!paletteChanged_)
+        paletteChanged_ = highlightColor_.isValid() && color != 
highlightColor_;
+
+    color = winTextColor_;
+    
winTextColor_.setNamedColor(settings.value(QLatin1String("window_text_color")).toString());
+    if (!paletteChanged_)
+        paletteChanged_ = winTextColor_.isValid() && color != winTextColor_;
+
+    color = textColor_;
+    
textColor_.setNamedColor(settings.value(QLatin1String("text_color")).toString());
+    if (!paletteChanged_)
+        paletteChanged_ = textColor_.isValid() && color != textColor_;
+
+    color = highlightedTextColor_;
+    
highlightedTextColor_.setNamedColor(settings.value(QLatin1String("highlighted_text_color")).toString());
+    if (!paletteChanged_)
+        paletteChanged_ = color != highlightedTextColor_.isValid() && color != 
highlightedTextColor_;
+
+    color = linkColor_;
+    
linkColor_.setNamedColor(settings.value(QLatin1String("link_color")).toString());
+    if (!paletteChanged_)
+        paletteChanged_ = linkColor_.isValid() && color != linkColor_;
+
+    color = linkVisitedColor_;
+    
linkVisitedColor_.setNamedColor(settings.value(QLatin1String("link_visited_color")).toString());
+    if (!paletteChanged_)
+        paletteChanged_ = linkVisitedColor_.isValid() && color != 
linkVisitedColor_;
+
+    if(paletteChanged_)
     {
         if(LXQtPalette_)
             delete LXQtPalette_;
+        // This sets all colors appropriately but valid custom colors are set 
below.
+        // If a custom color is not valid, Qt's calculated color will be used.
         LXQtPalette_ = new QPalette(winColor_);
+
+        if (baseColor_.isValid())
+        {
+            LXQtPalette_->setColor(QPalette::Base, baseColor_);
+            // See Qt -> qpalette.cpp -> qt_fusionPalette()
+            LXQtPalette_->setColor(QPalette::Disabled, QPalette::Base, 
winColor_);
+        }
+        if (highlightColor_.isValid())
+        {
+            LXQtPalette_->setColor(QPalette::Highlight, highlightColor_);
+            int gray = qGray(highlightColor_.rgb());
+            color = QColor(gray, gray, gray);
+            LXQtPalette_->setColor(QPalette::Disabled, QPalette::Highlight, 
color);
+        }
+        else
+        {
+            // Qt's default highlight color and that of Fusion may be 
different. This is a workaround:
+            LXQtPalette_->setColor(QPalette::Highlight, QColor(60, 140, 230));
+            if (highlightedTextColor_.isValid())
+                LXQtPalette_->setColor(QPalette::HighlightedText, QColor(255, 
255, 255));
+        }
+        if (winTextColor_.isValid())
+        {
+            LXQtPalette_->setColor(QPalette::WindowText, winTextColor_);
+            LXQtPalette_->setColor(QPalette::ButtonText, winTextColor_);
+            color = winTextColor_;
+            color.setAlpha(130);
+            LXQtPalette_->setColor(QPalette::Disabled, QPalette::WindowText, 
color);
+            LXQtPalette_->setColor(QPalette::Disabled, QPalette::ButtonText, 
color);
+        }
+        if (textColor_.isValid())
+        {
+            LXQtPalette_->setColor(QPalette::Text, textColor_);
+            color = textColor_;
+            color.setAlpha(130);
+            LXQtPalette_->setColor(QPalette::Disabled, QPalette::Text, color);
+        }
+        if (highlightedTextColor_.isValid())
+        {
+            LXQtPalette_->setColor(QPalette::HighlightedText, 
highlightedTextColor_);
+            color = highlightedTextColor_;
+            color.setAlpha(130);
+            LXQtPalette_->setColor(QPalette::Disabled, 
QPalette::HighlightedText, color);
+        }
+        if (linkColor_.isValid())
+            LXQtPalette_->setColor(QPalette::Link, linkColor_);
+        if (linkVisitedColor_.isValid())
+            LXQtPalette_->setColor(QPalette::LinkVisited, linkVisitedColor_);
     }
+    settings.endGroup();
+
+    // load Qt settings
+    settings.beginGroup(QLatin1String("Qt"));
+
+    // widget style
+    style_ = settings.value(QLatin1String("style"), 
QLatin1String("fusion")).toString();
 
     // SystemFont
     fontStr_ = settings.value(QLatin1String("font")).toString();
@@ -184,21 +273,25 @@
     // update the settings and repaint the UI. We need to do it ourselves
     // through dirty hacks and private Qt internal APIs.
     QString oldStyle = style_;
-    QColor oldWinColor = winColor_;
     QString oldIconTheme = iconTheme_;
     QString oldFont = fontStr_;
     QString oldFixedFont = fixedFontStr_;
 
     loadSettings(); // reload the config file
 
-    if(style_ != oldStyle || winColor_ != oldWinColor) // the widget style or 
window color is changed
+    if(style_ != oldStyle || paletteChanged_) // the widget style or palette 
is changed
     {
         // ask Qt5 to apply the new style
-        if(qobject_cast<QApplication *>(QCoreApplication::instance()))
+        if(auto app = qobject_cast<QApplication 
*>(QCoreApplication::instance()))
         {
             QApplication::setStyle(style_);
+            // Qt 5.15 needs this and it's safe otherwise
             if(LXQtPalette_)
-                QApplication::setPalette(*LXQtPalette_); // Qt 5.15 needs this 
and it's safe otherwise
+            {
+                QApplication::setPalette(*LXQtPalette_);
+                // the app should be polished because the style may have an 
internal palette
+                QApplication::style()->polish(app);
+            }
         }
     }
 
@@ -234,10 +327,6 @@
         // Qt5 added a QEvent::ThemeChange event.
         QEvent event(QEvent::ThemeChange);
         QApplication::sendEvent(widget, &event);
-        // Also, set the palette because it may not be updated for some 
widgets.
-        // WARNING: The app palette should be used, not LXQtPalette_, because
-        // some widget styles have their own palettes.
-        widget->setPalette(QApplication::palette());
     }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lxqt-qtplugin-0.15.1/src/lxqtplatformtheme.h 
new/lxqt-qtplugin-0.16.0/src/lxqtplatformtheme.h
--- old/lxqt-qtplugin-0.15.1/src/lxqtplatformtheme.h    2020-05-31 
14:56:21.000000000 +0200
+++ new/lxqt-qtplugin-0.16.0/src/lxqtplatformtheme.h    2020-10-30 
14:42:33.000000000 +0100
@@ -97,7 +97,10 @@
     // other Qt settings
     // widget
     QString style_;
-    QColor winColor_;
+    QColor winColor_, baseColor_, highlightColor_,
+           winTextColor_, textColor_, highlightedTextColor_,
+           linkColor_, linkVisitedColor_;
+    bool paletteChanged_;
     QString fontStr_;
     QFont font_;
     QString fixedFontStr_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lxqt-qtplugin-0.15.1/src/statusnotifieritem/statusnotifieritem.cpp 
new/lxqt-qtplugin-0.16.0/src/statusnotifieritem/statusnotifieritem.cpp
--- old/lxqt-qtplugin-0.15.1/src/statusnotifieritem/statusnotifieritem.cpp      
2020-05-31 14:56:21.000000000 +0200
+++ new/lxqt-qtplugin-0.16.0/src/statusnotifieritem/statusnotifieritem.cpp      
2020-10-30 14:42:33.000000000 +0100
@@ -29,6 +29,7 @@
 #include "statusnotifieritemadaptor.h"
 #include <QDBusInterface>
 #include <QDBusServiceWatcher>
+#include <utility>
 #include <dbusmenuexporter.h>
 
 int StatusNotifierItem::mServiceCounter = 0;
@@ -39,7 +40,7 @@
     mService(QString::fromLatin1("org.freedesktop.StatusNotifierItem-%1-%2")
              .arg(QCoreApplication::applicationPid())
              .arg(++mServiceCounter)),
-    mId(id),
+    mId(std::move(id)),
     mTitle(QLatin1String("Test")),
     mStatus(QLatin1String("Active")),
     mCategory(QLatin1String("ApplicationStatus")),



Reply via email to