Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package applet-window-buttons for 
openSUSE:Factory checked in at 2021-05-11 23:04:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/applet-window-buttons (Old)
 and      /work/SRC/openSUSE:Factory/.applet-window-buttons.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "applet-window-buttons"

Tue May 11 23:04:39 2021 rev:9 rq:892286 version:0.9.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/applet-window-buttons/applet-window-buttons.changes  
    2021-02-25 18:27:58.322201318 +0100
+++ 
/work/SRC/openSUSE:Factory/.applet-window-buttons.new.2988/applet-window-buttons.changes
    2021-05-11 23:04:50.828775906 +0200
@@ -1,0 +2,14 @@
+Tue May 11 18:32:19 UTC 2021 - Cor Blom <[email protected]>
+
+- Update to 0.9.0:
+  * support Plasma 5.18 and 5.21
+  * support aurorae monochrome icons with Latte auto-color functionality
+  * support aurorae restore button
+  * fix, do not hide buttons for AlwaysVisible
+  * fix, do not hide button in Latte edit mode
+  * fix, improve default based on Plasma values
+  * fix, preserve empty space for hidden states when needed
+  * remove no needed workarounds
+_ Remove fix-build-plasma-5.21.patch (part of release now)
+
+-------------------------------------------------------------------

Old:
----
  applet-window-buttons-0.8.1.tar.gz
  fix-build-plasma-5.21.patch

New:
----
  applet-window-buttons-0.9.0.tar.gz

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

Other differences:
------------------
++++++ applet-window-buttons.spec ++++++
--- /var/tmp/diff_new_pack.BZiBZM/_old  2021-05-11 23:04:51.244774189 +0200
+++ /var/tmp/diff_new_pack.BZiBZM/_new  2021-05-11 23:04:51.244774189 +0200
@@ -20,15 +20,13 @@
 %define qt5_version 5.9
 
 Name:           applet-window-buttons
-Version:        0.8.1
+Version:        0.9.0
 Release:        0
 Summary:        Plasma 5 applet to show window buttons in panels
 License:        GPL-2.0-or-later
 Group:          System/GUI/KDE
 URL:            https://github.com/psifidotos/applet-window-buttons
 Source:         
https://github.com/psifidotos/applet-window-buttons/archive/%{version}/%{name}-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM fix compilation with Plasma 5.21
-Patch0:         fix-build-plasma-5.21.patch
 BuildRequires:  extra-cmake-modules
 BuildRequires:  fdupes
 BuildRequires:  kconfig-devel >= %{kf5_version}
@@ -56,7 +54,7 @@
 support Plasma panels.
 
 %prep
-%autosetup -p1
+%autosetup
 
 %build
 %cmake_kf5 -d build

++++++ applet-window-buttons-0.8.1.tar.gz -> applet-window-buttons-0.9.0.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/applet-window-buttons-0.8.1/CHANGELOG.md 
new/applet-window-buttons-0.9.0/CHANGELOG.md
--- old/applet-window-buttons-0.8.1/CHANGELOG.md        2020-02-12 
16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/CHANGELOG.md        2021-05-11 
18:28:50.000000000 +0200
@@ -1,5 +1,17 @@
 ### CHANGELOG
 
+#### Version 0.9.0
+
+* support Plasma 5.18 and 5.21
+* support aurorae monochrome icons with Latte auto-color functionality
+* support aurorae restore button
+* fix, do not hide buttons for AlwaysVisible
+* fix, do not hide button in Latte edit mode
+* fix, improve default based on Plasma values
+* fix, preserve empty space for hidden states when needed
+* remove no needed workarounds
+
+
 #### Version 0.8.1
 
 * fix compatibility with Plasma 5.18 (Rodrigo Pedra Brum)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/applet-window-buttons-0.8.1/CMakeLists.txt 
new/applet-window-buttons-0.9.0/CMakeLists.txt
--- old/applet-window-buttons-0.8.1/CMakeLists.txt      2020-02-12 
16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/CMakeLists.txt      2021-05-11 
18:28:50.000000000 +0200
@@ -2,7 +2,7 @@
 cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
 
 set(CMAKE_CXX_STANDARD 14)
-set(VERSION 0.8.1)
+set(VERSION 0.9.0)
 set(AUTHOR "Michail Vourlakos")
 set(EMAIL "[email protected]")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/applet-window-buttons-0.8.1/INSTALLATION.md 
new/applet-window-buttons-0.9.0/INSTALLATION.md
--- old/applet-window-buttons-0.8.1/INSTALLATION.md     2020-02-12 
16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/INSTALLATION.md     2021-05-11 
18:28:50.000000000 +0200
@@ -10,6 +10,15 @@
 ```
 sudo apt install g++ extra-cmake-modules qtbase5-dev qtdeclarative5-dev 
libkf5declarative-dev libkf5plasma-dev libkdecorations2-dev gettext
 ```
+- Fedora:
+```
+sudo dnf install extra-cmake-modules qt5-qtdeclarative-devel kf5-plasma-devel 
kf5-kdeclarative-devel kf5-kconfigwidgets-devel kf5-ki18n-devel 
kdecoration-devel
+```
+- Arch:
+```
+sudo pacman -Syu
+sudo pacman -S gcc extra-cmake-modules plasma-framework gettext kdecoration
+```
 
 ### Building and Installing
 Once you have installed the dependencies listed above you can execute the 
build and install script:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/applet-window-buttons-0.8.1/install.sh 
new/applet-window-buttons-0.9.0/install.sh
--- old/applet-window-buttons-0.8.1/install.sh  2020-02-12 16:40:28.000000000 
+0100
+++ new/applet-window-buttons-0.9.0/install.sh  2021-05-11 18:28:50.000000000 
+0200
@@ -2,6 +2,6 @@
     mkdir build
 fi
 cd build
-cmake -DCMAKE_INSTALL_PREFIX=/usr .. -Wnodev
-make
+cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -Wnodev ..
+make -j$(nproc)
 sudo make install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/libappletdecoration/appletdecorationplugin.cpp 
new/applet-window-buttons-0.9.0/libappletdecoration/appletdecorationplugin.cpp
--- 
old/applet-window-buttons-0.8.1/libappletdecoration/appletdecorationplugin.cpp  
    2020-02-12 16:40:28.000000000 +0100
+++ 
new/applet-window-buttons-0.9.0/libappletdecoration/appletdecorationplugin.cpp  
    2021-05-11 18:28:50.000000000 +0200
@@ -57,10 +57,17 @@
     qmlRegisterType<Decoration::Applet::ExtendedTheme>(uri, 0, 1, 
"PlasmaThemeExtended");
     qmlRegisterType<Decoration::Applet::WindowSystem>(uri, 0, 1, 
"WindowSystem");
 
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
+    qmlRegisterAnonymousType<Decoration::Applet::Padding>("", 1);
+    qmlRegisterAnonymousType<Decoration::Applet::PreviewClient>("", 1);
+    qmlRegisterAnonymousType<Decoration::Applet::PreviewBridge>("", 1);
+    qmlRegisterAnonymousType<KDecoration2::Decoration>("", 1);
+#else
     qmlRegisterType<Decoration::Applet::Padding>();
     qmlRegisterType<Decoration::Applet::PreviewClient>();
     qmlRegisterType<Decoration::Applet::PreviewBridge>();
     qmlRegisterType<KDecoration2::Decoration>();
+#endif
 
     qmlRegisterSingletonType<Decoration::Applet::Environment>(uri, 0, 1, 
"Environment", &Decoration::Applet::Environment::instance);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/libappletdecoration/auroraetheme.cpp 
new/applet-window-buttons-0.9.0/libappletdecoration/auroraetheme.cpp
--- old/applet-window-buttons-0.8.1/libappletdecoration/auroraetheme.cpp        
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/libappletdecoration/auroraetheme.cpp        
2021-05-11 18:28:50.000000000 +0200
@@ -122,6 +122,21 @@
     return m_titleBackgroundColor;
 }
 
+bool AuroraeTheme::hasMonochromeIcons() const
+{
+    return m_hasMonochromeIcons;
+}
+
+bool AuroraeTheme::hasRestoreButton() const
+{
+    return m_hasRestoreButton;
+}
+
+QString AuroraeTheme::monochromePrefix() const
+{
+    return m_monochromePrefix;
+}
+
 void AuroraeTheme::auroraeRCChanged(const QString &filename)
 {
     if (!filename.endsWith(s_auroraerc)) {
@@ -147,6 +162,8 @@
         m_themeType = "svg";
     }
 
+    m_hasRestoreButton = QFileInfo(path + "/restore." + m_themeType).exists();
+
     m_themeName = name;
     m_themePath = path;
 }
@@ -180,6 +197,16 @@
     m_buttonHeight = layoutGroup.readEntry("ButtonHeight", 24);
     m_buttonSpacing = layoutGroup.readEntry("ButtonSpacing", 2);
 
+    QString monoprefix = generalGroup.readEntry("MonochromeIconsPrefix","");
+
+    if (!monoprefix.isEmpty()) {
+        m_hasMonochromeIcons = true;
+        m_monochromePrefix = (monoprefix == "*" ? "" : monoprefix);
+    } else {
+        m_hasMonochromeIcons = false;
+        m_monochromePrefix = "";
+    }
+
     parseThemeImages();
 
     emit settingsChanged();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/libappletdecoration/auroraetheme.h 
new/applet-window-buttons-0.9.0/libappletdecoration/auroraetheme.h
--- old/applet-window-buttons-0.8.1/libappletdecoration/auroraetheme.h  
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/libappletdecoration/auroraetheme.h  
2021-05-11 18:28:50.000000000 +0200
@@ -45,6 +45,11 @@
 
     Q_PROPERTY(QColor titleBackgroundColor READ titleBackgroundColor NOTIFY 
settingsChanged)
 
+    Q_PROPERTY(bool hasRestoreButton READ hasRestoreButton NOTIFY 
settingsChanged)
+
+    Q_PROPERTY(bool hasMonochromeIcons READ hasMonochromeIcons NOTIFY 
settingsChanged)
+    Q_PROPERTY(QString monochromePrefix READ monochromePrefix NOTIFY 
settingsChanged)
+
 public:
     explicit AuroraeTheme(QObject *parent = nullptr);
     ~AuroraeTheme() override;;
@@ -65,6 +70,11 @@
 
     QColor titleBackgroundColor() const;
 
+    bool hasRestoreButton() const;
+
+    bool hasMonochromeIcons() const;
+    QString monochromePrefix() const;
+
 signals:
     void settingsChanged();
     void themeChanged();
@@ -78,6 +88,9 @@
     void updateAurorae(const QString &themeName);
 
 private:
+    bool m_hasMonochromeIcons{false};
+    bool m_hasRestoreButton{false};
+
     int m_buttonHeight{24};
     int m_buttonWidth{24};
     int m_buttonSpacing{2};
@@ -90,6 +103,8 @@
     QString m_themePath;
     QString m_themeType;
 
+    QString m_monochromePrefix;
+
     QColor m_titleBackgroundColor;
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/libappletdecoration/previewclient.cpp 
new/applet-window-buttons-0.9.0/libappletdecoration/previewclient.cpp
--- old/applet-window-buttons-0.8.1/libappletdecoration/previewclient.cpp       
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/libappletdecoration/previewclient.cpp       
2021-05-11 18:28:50.000000000 +0200
@@ -38,7 +38,7 @@
     , ApplicationMenuEnabledDecoratedClientPrivate(c, decoration)
     , m_icon(QIcon::fromTheme(QStringLiteral("start-here-kde")))
     , m_iconName(m_icon.name())
-      //  , m_palette(new 
KWin::Decoration::DecorationPalette(QStringLiteral("kdeglobals")))
+    //  , m_palette(new 
KWin::Decoration::DecorationPalette(QStringLiteral("kdeglobals")))
     , m_active(true)
     , m_closeable(true)
     , m_keepBelow(false)
@@ -71,40 +71,40 @@
     connect(this, &PreviewClient::maximizedVerticallyChanged,   c, 
&KDecoration2::DecoratedClient::maximizedVerticallyChanged);
     connect(this, &PreviewClient::maximizedHorizontallyChanged, c, 
&KDecoration2::DecoratedClient::maximizedHorizontallyChanged);
     connect(this, &PreviewClient::minimizableChanged,           c, 
&KDecoration2::DecoratedClient::minimizeableChanged);
-//         connect(this, &PreviewClient::modalChanged, c, 
&DecoratedClient::modalChanged);
+    //         connect(this, &PreviewClient::modalChanged, c, 
&DecoratedClient::modalChanged);
     connect(this, &PreviewClient::movableChanged,               c, 
&KDecoration2::DecoratedClient::moveableChanged);
     connect(this, &PreviewClient::onAllDesktopsChanged,         c, 
&KDecoration2::DecoratedClient::onAllDesktopsChanged);
     connect(this, &PreviewClient::resizableChanged,             c, 
&KDecoration2::DecoratedClient::resizeableChanged);
     connect(this, &PreviewClient::shadeableChanged,             c, 
&KDecoration2::DecoratedClient::shadeableChanged);
     connect(this, &PreviewClient::shadedChanged,                c, 
&KDecoration2::DecoratedClient::shadedChanged);
     connect(this, &PreviewClient::providesContextHelpChanged,   c, 
&KDecoration2::DecoratedClient::providesContextHelpChanged);
-//    connect(this, &PreviewClient::onAllDesktopsChanged,         c, 
&KDecoration2::DecoratedClient::onAllDesktopsChanged);
+    //    connect(this, &PreviewClient::onAllDesktopsChanged,         c, 
&KDecoration2::DecoratedClient::onAllDesktopsChanged);
     connect(this, &PreviewClient::widthChanged,                 c, 
&KDecoration2::DecoratedClient::widthChanged);
     connect(this, &PreviewClient::heightChanged,                c, 
&KDecoration2::DecoratedClient::heightChanged);
     connect(this, &PreviewClient::iconChanged,                  c, 
&KDecoration2::DecoratedClient::iconChanged);
     connect(this, &PreviewClient::paletteChanged,               c, 
&KDecoration2::DecoratedClient::paletteChanged);
-//         connect(this, &PreviewClient::, c, &DecoratedClient::);
+    //         connect(this, &PreviewClient::, c, &DecoratedClient::);
     connect(this, &PreviewClient::maximizedVerticallyChanged, this,
-    [this]() {
+            [this]() {
         emit maximizedChanged(isMaximized());
     }
-           );
+    );
     connect(this, &PreviewClient::maximizedHorizontallyChanged, this,
-    [this]() {
+            [this]() {
         emit maximizedChanged(isMaximized());
     }
-           );
+    );
     connect(this, &PreviewClient::iconNameChanged, this,
-    [this]() {
+            [this]() {
         m_icon = QIcon::fromTheme(m_iconName);
         emit iconChanged(m_icon);
     }
-           );
+    );
     connect(this, &PreviewClient::desktopChanged, this,
-    [this](int) {
+            [this](int) {
         emit onAllDesktopsChanged(isOnAllDesktops());
     }
-           );
+    );
     /* connect(m_palette, &KWin::Decoration::DecorationPalette::changed, 
[this]() {
          emit paletteChanged(m_palette->palette());
      });*/
@@ -387,6 +387,7 @@
 #if KDECORATION2_VERSION_MINOR >= 13
 void PreviewClient::requestShowToolTip(const QString &text)
 {
+    Q_UNUSED(text)
     //qDebug() << "tooltip show requested with text:" << text;
 }
 
@@ -403,6 +404,20 @@
 }
 #endif
 
+
+#if KDECORATION2_VERSION_MINOR <= 20
+void PreviewClient::requestShowWindowMenu()
+{
+    emit showWindowMenuRequested();
+}
+#else
+void PreviewClient::requestShowWindowMenu(const QRect &rect)
+{
+    emit showWindowMenuRequested();
+}
+#endif
+
+
 void PreviewClient::requestClose()
 {
     emit closeRequested();
@@ -441,11 +456,6 @@
     setKeepBelow(!isKeepBelow());
 }
 
-void PreviewClient::requestShowWindowMenu()
-{
-    emit showWindowMenuRequested();
-}
-
 void PreviewClient::requestShowApplicationMenu(const QRect &rect, int actionId)
 {
     Q_UNUSED(rect);
@@ -469,13 +479,13 @@
 
 #define SETTER(type, name, variable) \
     void PreviewClient::name(type variable) \
-    { \
-        if (m_##variable == variable) { \
-            return; \
-        } \
-        m_##variable = variable; \
-        emit variable##Changed(m_##variable); \
-    }
+{ \
+    if (m_##variable == variable) { \
+    return; \
+} \
+    m_##variable = variable; \
+    emit variable##Changed(m_##variable); \
+}
 
 #define SETTER2(name, variable) SETTER(bool, name, variable)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/libappletdecoration/previewclient.h 
new/applet-window-buttons-0.9.0/libappletdecoration/previewclient.h
--- old/applet-window-buttons-0.8.1/libappletdecoration/previewclient.h 
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/libappletdecoration/previewclient.h 
2021-05-11 18:28:50.000000000 +0200
@@ -111,6 +111,12 @@
     QSize size() const override;
 #endif
 
+#if KDECORATION2_VERSION_MINOR <= 20
+    void requestShowWindowMenu() override;
+#else
+    void requestShowWindowMenu(const QRect &rect) override;
+#endif
+
     void requestClose() override;
     void requestContextHelp() override;
     void requestToggleMaximization(Qt::MouseButtons buttons) override;
@@ -118,7 +124,6 @@
     void requestToggleKeepAbove() override;
     void requestToggleKeepBelow() override;
     void requestToggleShade() override;
-    void requestShowWindowMenu() override;
     void requestShowApplicationMenu(const QRect &rect, int actionId) override;
     void requestToggleOnAllDesktops() override;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/libappletdecoration/qml/AuroraeButton.qml 
new/applet-window-buttons-0.9.0/libappletdecoration/qml/AuroraeButton.qml
--- old/applet-window-buttons-0.8.1/libappletdecoration/qml/AuroraeButton.qml   
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/libappletdecoration/qml/AuroraeButton.qml   
2021-05-11 18:28:50.000000000 +0200
@@ -18,6 +18,7 @@
 */
 
 import QtQuick 2.7
+import QtGraphicalEffects 1.0
 
 import org.kde.plasma.plasmoid 2.0
 import org.kde.plasma.core 2.0 as PlasmaCore
@@ -37,7 +38,9 @@
                       (isKeepAbove && buttonType === 
AppletDecoration.Types.KeepAbove)
         );
     }
-    
+
+    property bool monochromeIconsEnabled: false
+    property color monochromeIconsColor: "white"
 
     property int topPadding: 0
     property int bottomPadding: 0
@@ -48,13 +51,13 @@
 
     property QtObject auroraeTheme: null
 
-    property string buttonImagePath: auroraeTheme ? auroraeTheme.themePath + 
'/' + iconName + '.' + auroraeTheme.themeType : ""
+    property string buttonImagePath: auroraeTheme ? auroraeTheme.themePath + 
'/' + auroraeTheme.monochromePrefix + iconName + '.' + auroraeTheme.themeType : 
""
 
     property string iconName: {
         switch(buttonType){
         case AppletDecoration.Types.Close: return "close";
         case AppletDecoration.Types.Minimize: return "minimize";
-        case AppletDecoration.Types.Maximize: return "maximize";
+        case AppletDecoration.Types.Maximize: return 
(auroraeTheme.hasRestoreButton && button.isMaximized ? "restore" : "maximize");
         case AppletDecoration.Types.OnAllDesktops: return "alldesktops";
         case AppletDecoration.Types.KeepAbove: return "keepabove"
         default: return "close";
@@ -107,6 +110,16 @@
         }
     }
 
+    //! monochromize icon
+    Loader {
+        anchors.fill: svgNormalItem
+        active: monochromeIconsEnabled
+        sourceComponent:    ColorOverlay {
+            color: monochromeIconsColor
+            source: svgNormalItem
+        }
+    }
+
     // hovered icon
     PlasmaCore.SvgItem {
         id: svgHoveredItem
@@ -131,4 +144,14 @@
             readonly property int minimumSide: 
Math.min(parent.width,parent.height)
         }
     }
+
+    //! monochromize icon
+    Loader {
+        anchors.fill: svgHoveredItem
+        active: monochromeIconsEnabled && svgHoveredItem.opacity>0
+        sourceComponent:    ColorOverlay {
+            color: monochromeIconsColor
+            source: svgHoveredItem
+        }
+    }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/libappletdecoration/schemecolors.cpp 
new/applet-window-buttons-0.9.0/libappletdecoration/schemecolors.cpp
--- old/applet-window-buttons-0.8.1/libappletdecoration/schemecolors.cpp        
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/libappletdecoration/schemecolors.cpp        
2021-05-11 18:28:50.000000000 +0200
@@ -20,6 +20,7 @@
 
 #include "schemecolors.h"
 
+#include <config-decoration.h>
 #include "commontools.h"
 
 #include <QDebug>
@@ -161,7 +162,11 @@
         if (QFileInfo(settingsFile).exists()) {
             KSharedConfigPtr filePtr = KSharedConfig::openConfig(settingsFile);
             KConfigGroup generalGroup = KConfigGroup(filePtr, "General");
-            tempScheme = generalGroup.readEntry("ColorScheme", "");
+#if KDECORATION2_VERSION_MINOR >= 21
+            tempScheme = generalGroup.readEntry("ColorScheme", "BreezeLight");
+#else
+            tempScheme = generalGroup.readEntry("ColorScheme", "Breeze");
+#endif
         }
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/libappletdecoration/schemesmodel.cpp 
new/applet-window-buttons-0.9.0/libappletdecoration/schemesmodel.cpp
--- old/applet-window-buttons-0.8.1/libappletdecoration/schemesmodel.cpp        
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/libappletdecoration/schemesmodel.cpp        
2021-05-11 18:28:50.000000000 +0200
@@ -99,13 +99,25 @@
 
 QColor SchemesModel::backgroundOf(const int &index) const
 {
-    if (index>=0 && index<m_schemes.count()) {
+    if (index == 0) {
+        auto ind = indexOf(m_defaultSchemeFile);
+        return ind>=0 ? m_schemes[ind]->backgroundColor() : 
QColor("transparent");
+    }
+
+    if (index>0 && index<m_schemes.count()) {
         return m_schemes[index]->backgroundColor();
     }
 
     return QColor("transparent");
 }
 
+QString SchemesModel::defaultSchemeFile() const
+{
+    auto ind = indexOf(m_defaultSchemeFile);
+
+    return ind>=0 ? m_schemes[ind]->schemeFile() : QString();
+}
+
 void SchemesModel::initSchemes()
 {
     qDeleteAll(m_schemes);
@@ -113,6 +125,7 @@
 
     QString currentSchemePath = SchemeColors::possibleSchemeFile("kdeglobals");
     insertSchemeInList(currentSchemePath);
+    m_defaultSchemeFile = currentSchemePath;
 
     QStringList standardPaths = 
AppletDecoration::standardPathsFor("color-schemes");
 
@@ -155,7 +168,7 @@
     m_schemes.insert(atPos, tempScheme);
 }
 
-int SchemesModel::indexOf(QString file)
+int SchemesModel::indexOf(QString file) const
 {
     if (file.isEmpty() || file == "kdeglobals") {
         return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/libappletdecoration/schemesmodel.h 
new/applet-window-buttons-0.9.0/libappletdecoration/schemesmodel.h
--- old/applet-window-buttons-0.8.1/libappletdecoration/schemesmodel.h  
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/libappletdecoration/schemesmodel.h  
2021-05-11 18:28:50.000000000 +0200
@@ -40,9 +40,10 @@
     int rowCount(const QModelIndex &parent = QModelIndex()) const override;
     QHash< int, QByteArray > roleNames() const override;
 
-    Q_INVOKABLE int indexOf(QString file);
+    Q_INVOKABLE int indexOf(QString file) const;
     Q_INVOKABLE QColor backgroundOf(const int &index) const;
 
+    Q_INVOKABLE QString defaultSchemeFile() const;
 private slots:
     void initSchemes();
 
@@ -50,6 +51,7 @@
     void insertSchemeInList(QString file);
 
 private:
+    QString m_defaultSchemeFile;
     QList<Decoration::Applet::SchemeColors *> m_schemes;
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/package/contents/ui/LatteWindowsTracker.qml 
new/applet-window-buttons-0.9.0/package/contents/ui/LatteWindowsTracker.qml
--- old/applet-window-buttons-0.8.1/package/contents/ui/LatteWindowsTracker.qml 
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/package/contents/ui/LatteWindowsTracker.qml 
2021-05-11 18:28:50.000000000 +0200
@@ -21,10 +21,12 @@
 
 Item {
     id: latteWindowsTracker
+    property bool filterByScreen: true
+
     readonly property bool existsWindowActive: 
selectedTracker.lastActiveWindow.isValid && !lastActiveTaskItem.isMinimized && 
lastActiveTaskItem.isActive
     readonly property bool existsWindowShown: 
selectedTracker.lastActiveWindow.isValid && !lastActiveTaskItem.isMinimized
 
-    readonly property QtObject selectedTracker: 
plasmoid.configuration.filterByScreen ? 
latteBridge.windowsTracker.currentScreen : latteBridge.windowsTracker.allScreens
+    readonly property QtObject selectedTracker: filterByScreen ? 
latteBridge.windowsTracker.currentScreen : latteBridge.windowsTracker.allScreens
 
     readonly property Item lastActiveTaskItem: Item {
         readonly property string title: 
selectedTracker.lastActiveWindow.display
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/package/contents/ui/PlasmaTasksModel.qml 
new/applet-window-buttons-0.9.0/package/contents/ui/PlasmaTasksModel.qml
--- old/applet-window-buttons-0.8.1/package/contents/ui/PlasmaTasksModel.qml    
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/package/contents/ui/PlasmaTasksModel.qml    
2021-05-11 18:28:50.000000000 +0200
@@ -26,6 +26,7 @@
 
 Item {
     id: plasmaTasksItem
+    property bool filterByScreen: true
 
     readonly property bool existsWindowActive: lastActiveTaskItem && 
tasksRepeater.count > 0 && lastActiveTaskItem.isActive
     readonly property bool existsWindowShown: lastActiveTaskItem && 
tasksRepeater.count > 0 && !lastActiveTaskItem.isMinimized
@@ -50,7 +51,7 @@
         activity: activityInfo.currentActivity
         virtualDesktop: virtualDesktopInfo.currentDesktop
 
-        filterByScreen: plasmoid.configuration.filterByScreen
+        filterByScreen: plasmaTasksItem.filterByScreen
         filterByVirtualDesktop: true
         filterByActivity: true
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/package/contents/ui/config/OrderableListView.qml
 
new/applet-window-buttons-0.9.0/package/contents/ui/config/OrderableListView.qml
--- 
old/applet-window-buttons-0.8.1/package/contents/ui/config/OrderableListView.qml
    2020-02-12 16:40:28.000000000 +0100
+++ 
new/applet-window-buttons-0.9.0/package/contents/ui/config/OrderableListView.qml
    2021-05-11 18:28:50.000000000 +0200
@@ -65,6 +65,8 @@
     readonly property string appliedScheme: {
         if (selectedScheme === "_plasmatheme_") {
             return plasmaThemeExtended.colors.schemeFile;
+        } else if (selectedScheme === "kdeglobals") {
+            return colorsModel.defaultSchemeFile();
         }
 
         return selectedScheme;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applet-window-buttons-0.8.1/package/contents/ui/main.qml 
new/applet-window-buttons-0.9.0/package/contents/ui/main.qml
--- old/applet-window-buttons-0.8.1/package/contents/ui/main.qml        
2020-02-12 16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/package/contents/ui/main.qml        
2021-05-11 18:28:50.000000000 +0200
@@ -52,7 +52,7 @@
     readonly property bool plasma515: 
AppletDecoration.Environment.plasmaDesktopVersion >= 
AppletDecoration.Environment.makeVersion(5,15,0)
 
     readonly property bool mustHide: {
-        if (visibility === AppletDecoration.Types.AlwaysVisible) {
+        if (visibility === AppletDecoration.Types.AlwaysVisible || inEditMode) 
{
             return false;
         }
 
@@ -75,8 +75,7 @@
 
     readonly property bool slideAnimationEnabled: ( (visibility !== 
AppletDecoration.Types.AlwaysVisible)
                                                    && 
(plasmoid.configuration.hiddenState === AppletDecoration.Types.SlideOut) )
-    readonly property bool emptySpaceEnabled: ( (visibility !== 
AppletDecoration.Types.AlwaysVisible)
-                                                   && 
(plasmoid.configuration.hiddenState === AppletDecoration.Types.EmptySpace) )
+    readonly property bool isEmptySpaceEnabled: 
plasmoid.configuration.hiddenState === AppletDecoration.Types.EmptySpace
 
     readonly property int containmentType: 
plasmoid.configuration.containmentType
     readonly property int disabledMaximizedBorders: 
plasmoid.configuration.disabledMaximizedBorders
@@ -84,7 +83,7 @@
 
     readonly property int minimumWidth: {
         if (plasmoid.formFactor === PlasmaCore.Types.Horizontal) {
-            if (mustHide && slideAnimationEnabled && !plasmoid.userConfiguring 
&& !latteInEditMode){
+            if (mustHide && !isEmptySpaceEnabled && slideAnimationEnabled && 
!plasmoid.userConfiguring && !latteInEditMode){
                 return 0;
             }
         }
@@ -94,7 +93,7 @@
 
     readonly property int minimumHeight: {
         if (plasmoid.formFactor === PlasmaCore.Types.Vertical) {
-            if (mustHide && slideAnimationEnabled && !plasmoid.userConfiguring 
&& !latteInEditMode){
+            if (mustHide && !isEmptySpaceEnabled && slideAnimationEnabled && 
!plasmoid.userConfiguring && !latteInEditMode){
                 return 0;
             }
         }
@@ -105,7 +104,7 @@
     readonly property string buttonsStr: plasmoid.configuration.buttons
 
     Plasmoid.status: {
-        if (mustHide) {
+        if (mustHide && !isEmptySpaceEnabled) {
             if ((plasmoid.formFactor === PlasmaCore.Types.Horizontal && 
animatedMinimumWidth === 0)
                     || (plasmoid.formFactor === PlasmaCore.Types.Vertical && 
animatedMinimumHeight === 0)) {
                 return PlasmaCore.Types.HiddenStatus;
@@ -116,7 +115,7 @@
     }
 
     // START visual properties
-    property bool inactiveStateEnabled: root.latteInEditMode || 
plasmoid.userConfiguring ? false : plasmoid.configuration.inactiveStateEnabled
+    property bool inactiveStateEnabled: inEditMode ? false : 
plasmoid.configuration.inactiveStateEnabled
 
     property int thickPadding: {
         if (auroraeThemeEngine.isEnabled && 
plasmoid.configuration.useDecorationMetrics) {
@@ -199,7 +198,9 @@
             return latteBridge.palette.scheme;
         }
 
-        return plasmoid.configuration.selectedScheme;
+        return plasmoid.configuration.selectedScheme === "kdeglobals" ?
+                    colorsModel.defaultSchemeFile() :
+                    plasmoid.configuration.selectedScheme
     }
     // END decoration properties
 
@@ -249,30 +250,12 @@
         }
     }
 
-    onCurrentSchemeChanged: {
-        //! This is needed from some themes e.g. Oxygen in order to paint 
properly
-        //! scheme changes. In the future it must be investigated if it is
-        //! Oxygen fault.
-        if (currentPlugin === "org.kde.oxygen") {
-            initButtons();
-        }
-    }
-
     onDisabledMaximizedBordersChanged: {
         if (containmentType === AppletDecoration.Types.Plasma && 
disabledMaximizedBorders !== 1) { /*SystemDecision*/
             windowSystem.setDisabledMaximizedBorders(disabledMaximizedBorders);
         }
     }
 
-    onExistsWindowActiveChanged: {
-        //! This is needed from some themes e.g. Breeze in order to paint 
properly
-        //! active/inactive buttons. In the future it must be investigated if 
it is
-        //! Breeze fault
-        if (root.inactiveStateEnabled && (currentPlugin==="org.kde.breeze" || 
currentPlugin === "org.kde.oxygen")) {
-            initButtons();
-        }
-    }
-
     Connections{
         target: !auroraeThemeEngine.isEnabled ? root : null
         onThickPaddingChanged: initButtons();
@@ -314,12 +297,16 @@
 
         Component{
             id: latteTrackerComponent
-            LatteWindowsTracker{}
+            LatteWindowsTracker{
+                filterByScreen: plasmoid.configuration.filterByScreen
+            }
         }
 
         Component{
             id: plasmaTasksModel
-            PlasmaTasksModel{}
+            PlasmaTasksModel{
+                filterByScreen: plasmoid.configuration.filterByScreen
+            }
         }
     }
     //!
@@ -348,6 +335,10 @@
         id: decorations
     }
 
+    AppletDecoration.ColorsModel {
+        id: colorsModel
+    }
+
     AppletDecoration.PlasmaThemeExtended {
         id: plasmaThemeExtended
 
@@ -441,11 +432,11 @@
 
         onButtonThicknessChanged: console.log("Window Buttons Applet :: Button 
Thickness ::: " + buttonThickness);
 
-        opacity: emptySpaceEnabled && mustHide && !inEditMode ? 0 : 1
+        opacity: mustHide && !inEditMode ? 0 : 1
         visible: opacity === 0 ? false : true
 
         Behavior on opacity {
-            enabled: emptySpaceEnabled
+            enabled: isEmptySpaceEnabled
             NumberAnimation {
                 duration: 250
                 easing.type: Easing.InCubic
@@ -493,8 +484,11 @@
             localX: x
             localY: y
 
-            visible: {
-                if (visibility === AppletDecoration.Types.AlwaysVisible) {
+            opacity: isVisible ? 1 : 0
+            visible: (isVisible && !root.isEmptySpaceEnabled) || 
root.isEmptySpaceEnabled
+
+            readonly property bool isVisible: {
+                if (visibility === AppletDecoration.Types.AlwaysVisible || 
inEditMode) {
                     return true;
                 }
 
@@ -611,8 +605,14 @@
             buttonType: model.buttonType
             auroraeTheme: auroraeThemeEngine
 
-            visible: {
-                if (visibility === AppletDecoration.Types.AlwaysVisible) {
+            monochromeIconsEnabled: latteBridge && latteBridge.applyPalette && 
auroraeThemeEngine.hasMonochromeIcons
+            monochromeIconsColor: latteBridge ? latteBridge.palette.textColor 
: "transparent"
+
+            opacity: isVisible ? 1 : 0
+            visible: (isVisible && !root.isEmptySpaceEnabled) || 
root.isEmptySpaceEnabled
+
+            readonly property bool isVisible: {
+                if (visibility === AppletDecoration.Types.AlwaysVisible || 
inEditMode) {
                     return true;
                 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/applet-window-buttons-0.8.1/package/metadata.desktop 
new/applet-window-buttons-0.9.0/package/metadata.desktop
--- old/applet-window-buttons-0.8.1/package/metadata.desktop    2020-02-12 
16:40:28.000000000 +0100
+++ new/applet-window-buttons-0.9.0/package/metadata.desktop    2021-05-11 
18:28:50.000000000 +0200
@@ -15,7 +15,7 @@
 [email protected]
 X-KDE-PluginInfo-License=GPLv2
 X-KDE-PluginInfo-Name=org.kde.windowbuttons
-X-KDE-PluginInfo-Version=0.8.1
+X-KDE-PluginInfo-Version=0.9.0
 X-KDE-PluginInfo-Website=https://github.com/psifidotos/applet-window-buttons
 X-KDE-ServiceTypes=Plasma/Applet
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/applet-window-buttons-0.8.1/uninstall.sh 
new/applet-window-buttons-0.9.0/uninstall.sh
--- old/applet-window-buttons-0.8.1/uninstall.sh        1970-01-01 
01:00:00.000000000 +0100
+++ new/applet-window-buttons-0.9.0/uninstall.sh        2021-05-11 
18:28:50.000000000 +0200
@@ -0,0 +1,11 @@
+#!/bin/bash
+#Author: Michail Vourlakos
+#Summary: Uninstallation script
+#This script was written and tested on openSuSe Leap 42.1
+
+if [ -f build/install_manifest.txt ]; then
+   echo "Uninstallation file exists..."
+   sudo xargs -d '\n' rm < build/install_manifest.txt
+else
+   echo "Uninstallation file does not exist."
+fi

Reply via email to