Hello community,

here is the log from the commit of package qqc2-desktop-style for 
openSUSE:Factory checked in at 2018-04-20 17:28:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qqc2-desktop-style (Old)
 and      /work/SRC/openSUSE:Factory/.qqc2-desktop-style.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qqc2-desktop-style"

Fri Apr 20 17:28:29 2018 rev:8 rq:597241 version:5.45.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/qqc2-desktop-style/qqc2-desktop-style.changes    
2018-03-22 12:08:17.682839850 +0100
+++ 
/work/SRC/openSUSE:Factory/.qqc2-desktop-style.new/qqc2-desktop-style.changes   
    2018-04-20 17:30:09.789030771 +0200
@@ -1,0 +2,24 @@
+Mon Apr 16 09:40:37 UTC 2018 - wba...@tmo.at
+
+- Add fix-build-with-gcc48.patch to make it compile with gcc 4.8 on
+  Leap 42.3
+
+-------------------------------------------------------------------
+Sat Apr 14 13:19:09 CEST 2018 - lbeltr...@kde.org
+
+- Update to 5.45.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.45.0.php
+- Changes since 5.44.0:
+  * fix rendering when disabled
+  * better layout
+  * experimental support for auto mnemonics
+  * We depend against 5.8.0
+  * Make sure we are taking into account hte size of the element when styling
+  * Fix font rendering for non-HiDPI and integer scale factors (kde#391780)
+  * e our way to handle shortcuts
+  * fix icons colors with colorsets
+  * fix icon colors for toolbuttons
+
+-------------------------------------------------------------------

Old:
----
  qqc2-desktop-style-5.44.0.tar.xz

New:
----
  fix-build-with-gcc48.patch
  qqc2-desktop-style-5.45.0.tar.xz

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

Other differences:
------------------
++++++ qqc2-desktop-style.spec ++++++
--- /var/tmp/diff_new_pack.L9tSxD/_old  2018-04-20 17:30:10.680998422 +0200
+++ /var/tmp/diff_new_pack.L9tSxD/_new  2018-04-20 17:30:10.684998277 +0200
@@ -16,15 +16,17 @@
 #
 
 
-%define _tar_path 5.44
+%define _tar_path 5.45
 Name:           qqc2-desktop-style
-Version:        5.44.0
+Version:        5.45.0
 Release:        0
 Summary:        A Qt Quick Controls 2 Style for Desktop UIs
 License:        GPL-2.0-or-later
 Group:          Development/Libraries/KDE
 Url:            http://www.kde.org/
 Source:         
https://download.kde.org/stable/frameworks/%{_tar_path}/qqc2-desktop-style-%{version}.tar.xz
+# PATCH-FIX-OPENSUSE
+Patch:          fix-build-with-gcc48.patch
 BuildRequires:  extra-cmake-modules >= 0.0.8
 BuildRequires:  kf5-filesystem
 # For dir ownership
@@ -65,6 +67,9 @@
 
 %prep
 %setup -q
+%if 0%{?suse_version} < 1500
+%patch -p1
+%endif
 
 %build
 %cmake_kf5 -d build

++++++ fix-build-with-gcc48.patch ++++++
>From 12755f964b745b60f7a503bcd8a1a532ae87418a Mon Sep 17 00:00:00 2001
From: Wolfgang Bauer <wba...@tmo.at>
Date: Mon, 16 Apr 2018 11:40:32 +0200
Subject: [PATCH] Fix build with gcc 4.8

See https://bugreports.qt.io/browse/QTBUG-48988
---
 plugin/kquickstyleitem.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugin/kquickstyleitem.cpp b/plugin/kquickstyleitem.cpp
index 02fd313..ef56ed8 100644
--- a/plugin/kquickstyleitem.cpp
+++ b/plugin/kquickstyleitem.cpp
@@ -1564,7 +1564,7 @@ void KQuickStyleItem::setControl(QQuickItem *control)
             m_window = m_control->window();
             m_window->installEventFilter(this);
         }
-        connect(m_control, &QQuickItem::windowChanged, this,
+        connect(m_control.data(), &QQuickItem::windowChanged, this,
                 [this](QQuickWindow *window) {
             if (m_window) {
                 m_window->removeEventFilter(this);
-- 
2.13.6

++++++ qqc2-desktop-style-5.44.0.tar.xz -> qqc2-desktop-style-5.45.0.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.44.0/CMakeLists.txt 
new/qqc2-desktop-style-5.45.0/CMakeLists.txt
--- old/qqc2-desktop-style-5.44.0/CMakeLists.txt        2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/CMakeLists.txt        2018-04-07 
09:49:08.000000000 +0200
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.0)
 
-set(KF5_VERSION "5.44.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.44.0") # handled by release scripts
+set(KF5_VERSION "5.45.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.45.0") # handled by release scripts
 
 project(qqc2-desktop-style VERSION ${KF5_VERSION})
 
-set(REQUIRED_QT_VERSION "5.7.0")
+set(REQUIRED_QT_VERSION 5.8.0)
 
 ################# Disallow in-source build #################
 
@@ -21,7 +21,7 @@
 
 ################# set KDE specific information #################
 
-find_package(ECM 5.44.0 REQUIRED NO_MODULE)
+find_package(ECM 5.45.0 REQUIRED NO_MODULE)
 
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is 
checked
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} 
${ECM_KDE_MODULE_DIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.44.0/org.kde.desktop/Button.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/Button.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/Button.qml    2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/Button.qml    2018-04-07 
09:49:08.000000000 +0200
@@ -22,7 +22,7 @@
 import QtQuick 2.6
 import QtQuick.Templates @QQC2_VERSION@ as T
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
-import org.kde.kirigami 2.2 as Kirigami
+import org.kde.kirigami 2.3 as Kirigami
 
 T.Button {
     id: controlRoot
@@ -35,6 +35,15 @@
     hoverEnabled: true //Qt.styleHints.useHoverEffects TODO: how to make this 
work in 5.7?
 
     contentItem: Item {}
+    Kirigami.MnemonicData.enabled: controlRoot.enabled && controlRoot.visible
+    Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.ActionElement
+    Kirigami.MnemonicData.label: controlRoot.text
+    Shortcut {
+        //in case of explicit & the button manages it by itself
+        enabled: !(RegExp(/\&[^\&]/).test(controlRoot.text))
+        sequence: controlRoot.Kirigami.MnemonicData.sequence
+        onActivated: controlRoot.clicked()
+    }
     background: StylePrivate.StyleItem {
         id: styleitem
         control: controlRoot
@@ -42,12 +51,12 @@
         sunken: controlRoot.pressed || (controlRoot.checkable && 
controlRoot.checked)
         raised: !(controlRoot.pressed || (controlRoot.checkable && 
controlRoot.checked))
         hover: controlRoot.hovered
-        text: controlRoot.text
+        text: controlRoot.Kirigami.MnemonicData.mnemonicLabel
         hasFocus: controlRoot.activeFocus
         activeControl: controlRoot.isDefault ? "default" : "f"
         properties: {
             "icon": controlRoot.icon ? (controlRoot.icon.name || 
controlRoot.icon.source) : "",
-            "iconColor": controlRoot.icon ? controlRoot.icon.color : 
"transparent"
+            "iconColor": controlRoot.icon && controlRoot.icon.color.a > 0? 
controlRoot.icon.color : Kirigami.Theme.textColor
         }
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.44.0/org.kde.desktop/CheckBox.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/CheckBox.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/CheckBox.qml  2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/CheckBox.qml  2018-04-07 
09:49:08.000000000 +0200
@@ -23,7 +23,7 @@
 import QtQuick 2.6
 import QtQuick.Templates @QQC2_VERSION@ as T
 import QtQuick.Controls @QQC2_VERSION@
-import org.kde.kirigami 2.2 as Kirigami
+import org.kde.kirigami 2.3 as Kirigami
 
 T.CheckBox {
     id: controlRoot
@@ -50,11 +50,21 @@
         control: controlRoot
     }
 
+    Kirigami.MnemonicData.enabled: controlRoot.enabled && controlRoot.visible
+    Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.ActionElement
+    Kirigami.MnemonicData.label: controlRoot.text
+    Shortcut {
+        //in case of explicit & the button manages it by itself
+        enabled: !(RegExp(/\&[^\&]/).test(controlRoot.text))
+        sequence: controlRoot.Kirigami.MnemonicData.sequence
+        onActivated: controlRoot.toggle();
+    }
+
     contentItem: Label {
         leftPadding: controlRoot.indicator && !controlRoot.mirrored ? 
controlRoot.indicator.width + controlRoot.spacing : 0
         rightPadding: controlRoot.indicator && controlRoot.mirrored ? 
controlRoot.indicator.width + controlRoot.spacing : 0
         opacity: controlRoot.enabled ? 1 : 0.6
-        text: controlRoot.text
+        text: controlRoot.Kirigami.MnemonicData.richTextLabel
         font: controlRoot.font
         elide: Text.ElideRight
         visible: controlRoot.text
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.44.0/org.kde.desktop/ComboBox.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/ComboBox.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/ComboBox.qml  2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/ComboBox.qml  2018-04-07 
09:49:08.000000000 +0200
@@ -76,7 +76,10 @@
             readOnly: controlRoot.popup.visible
             inputMethodHints: controlRoot.inputMethodHints
             validator: controlRoot.validator
-            renderType: Window.devicePixelRatio % 1 !== 0 ? Text.QtRendering : 
Text.NativeRendering
+
+            // Work around Qt bug where NativeRendering breaks for non-integer 
scale factors
+            // https://bugreports.qt.io/browse/QTBUG-67007
+            renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : 
Text.NativeRendering
             color: controlRoot.enabled ? Kirigami.Theme.textColor : 
Kirigami.Theme.disabledTextColor
             selectionColor: Kirigami.Theme.highlightColor
             selectedTextColor: Kirigami.Theme.highlightedTextColor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.44.0/org.kde.desktop/DialogButtonBox.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/DialogButtonBox.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/DialogButtonBox.qml   
2018-03-03 10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/DialogButtonBox.qml   
2018-04-07 09:49:08.000000000 +0200
@@ -22,7 +22,7 @@
 
 import QtQuick 2.6
 import QtQuick.Templates @QQC2_VERSION@ as T
-import org.kde.kirigami 2.2 as Kirigami
+import org.kde.kirigami 2.3 as Kirigami
 
 T.DialogButtonBox {
     id: control
@@ -36,6 +36,7 @@
 
     delegate: Button {
         width: Math.min(implicitWidth, control.width / control.count - 
control.padding - control.spacing * control.count)
+        Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.DialogButton
     }
 
     contentItem: ListView {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.44.0/org.kde.desktop/Label.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/Label.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/Label.qml     2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/Label.qml     2018-04-07 
09:49:08.000000000 +0200
@@ -32,8 +32,10 @@
     verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter
 
     activeFocusOnTab: false
-    //Text.NativeRendering is broken on non integer pixel ratios
-    renderType: Window.devicePixelRatio % 1 !== 0 ? Text.QtRendering : 
Text.NativeRendering
+
+    // Work around Qt bug where NativeRendering breaks for non-integer scale 
factors
+    // https://bugreports.qt.io/browse/QTBUG-67007
+    renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : 
Text.NativeRendering
     
 
     font.capitalization: Kirigami.Theme.defaultFont.capitalization
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.44.0/org.kde.desktop/MenuBarItem.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/MenuBarItem.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/MenuBarItem.qml       
2018-03-03 10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/MenuBarItem.qml       
2018-04-07 09:49:08.000000000 +0200
@@ -23,28 +23,40 @@
 import QtQuick 2.6
 import QtQuick.Layouts 1.2
 import QtQuick.Templates @QQC2_VERSION@ as T
-import org.kde.kirigami 2.2 as Kirigami
+import org.kde.kirigami 2.3 as Kirigami
 
 T.MenuBarItem {
     id: controlRoot
 
-    implicitWidth: Math.max(background ? background.implicitWidth : 0,
-                            contentItem.implicitWidth + leftPadding + 
rightPadding)
-    implicitHeight: Math.max(background ? background.implicitHeight : 0,
-                             contentItem.implicitHeight + topPadding + 
bottomPadding)
+    implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
+    implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
     baselineOffset: contentItem.y + contentItem.baselineOffset
 
     Layout.fillWidth: true
-    padding: 3
+    leftPadding: Kirigami.Units.largeSpacing
+    rightPadding: Kirigami.Units.largeSpacing
+    topPadding: Kirigami.Units.smallSpacing
+    bottomPadding: Kirigami.Units.smallSpacing
     hoverEnabled: true
 
+    Kirigami.MnemonicData.enabled: controlRoot.enabled && controlRoot.visible
+    Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.MenuItem
+    Kirigami.MnemonicData.label: controlRoot.text
+
+    Shortcut {
+        //in case of explicit & the button manages it by itself
+        enabled: !(RegExp(/\&[^\&]/).test(controlRoot.text))
+        sequence: controlRoot.Kirigami.MnemonicData.sequence
+        onActivated: controlRoot.clicked();
+    }
+
     contentItem: Label {
-        text: controlRoot.text
+        text: controlRoot.Kirigami.MnemonicData.richTextLabel
         font: controlRoot.font
         color: controlRoot.hovered && !controlRoot.pressed ? 
Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
         elide: Text.ElideRight
         visible: controlRoot.text
-        horizontalAlignment: Text.AlignLeft
+        horizontalAlignment: Text.AlignHCenter
         verticalAlignment: Text.AlignVCenter
     }
 
@@ -55,7 +67,7 @@
         Rectangle {
             anchors.fill: parent
             color: Kirigami.Theme.highlightColor
-            opacity: controlRoot.hovered && !controlRoot.pressed ? 1 : 0
+            opacity: controlRoot.down || controlRoot.highlighted  ? 0.7 : 0
             Behavior on opacity { NumberAnimation { duration: 150 } }
         }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.44.0/org.kde.desktop/MenuItem.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/MenuItem.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/MenuItem.qml  2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/MenuItem.qml  2018-04-07 
09:49:08.000000000 +0200
@@ -23,25 +23,41 @@
 import QtQuick 2.6
 import QtQuick.Layouts 1.2
 import QtQuick.Templates @QQC2_VERSION@ as T
-import org.kde.kirigami 2.2 as Kirigami
+import org.kde.kirigami 2.3 as Kirigami
 
 T.MenuItem {
     id: controlRoot
 
     implicitWidth: Math.max(background ? background.implicitWidth : 0,
                             contentItem.implicitWidth + leftPadding + 
rightPadding)
-    implicitHeight: Math.max(background ? background.implicitHeight : 0,
+    implicitHeight: visible ? Math.max(background ? background.implicitHeight 
: 0,
                              Math.max(contentItem.implicitHeight,
-                                      indicator ? indicator.implicitHeight : 
0) + topPadding + bottomPadding)
+                                      indicator ? indicator.implicitHeight : 
0) + topPadding + bottomPadding) : 0
     baselineOffset: contentItem.y + contentItem.baselineOffset
 
     Layout.fillWidth: true
     padding: 1
     hoverEnabled: !Kirigami.Settings.isMobile
 
+    Kirigami.MnemonicData.enabled: controlRoot.enabled && controlRoot.visible
+    Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.MenuItem
+    Kirigami.MnemonicData.label: controlRoot.text
+    Shortcut {
+        //in case of explicit & the button manages it by itself
+        enabled: !(RegExp(/\&[^\&]/).test(controlRoot.text))
+        sequence: controlRoot.Kirigami.MnemonicData.sequence
+        onActivated: {
+            if (controlRoot.checkable) {
+                controlRoot.toggle();
+            } else {
+                controlRoot.clicked();
+            }
+        }
+    }
+
     contentItem: RowLayout {
         Item {
-           Layout.preferredWidth: controlRoot.ListView.view.hasCheckables || 
controlRoot.checkable ? controlRoot.indicator.width : 0
+           Layout.preferredWidth: controlRoot.ListView.view.hasCheckables || 
controlRoot.checkable ? controlRoot.indicator.width : 
Kirigami.Units.smallSpacing
         }
         Kirigami.Icon {
             Layout.alignment: Qt.AlignVCenter
@@ -58,7 +74,7 @@
             Layout.alignment: Qt.AlignVCenter
             Layout.fillWidth: true
 
-            text: controlRoot.text
+            text: controlRoot.Kirigami.MnemonicData.richTextLabel
             font: controlRoot.font
             color: (controlRoot.highlighted || controlRoot.hovered) ? 
Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
             elide: Text.ElideRight
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.44.0/org.kde.desktop/RadioButton.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/RadioButton.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/RadioButton.qml       
2018-03-03 10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/RadioButton.qml       
2018-04-07 09:49:08.000000000 +0200
@@ -23,7 +23,7 @@
 import QtQuick 2.6
 import QtQuick.Templates @QQC2_VERSION@ as T
 import QtQuick.Controls @QQC2_VERSION@
-import org.kde.kirigami 2.2 as Kirigami
+import org.kde.kirigami 2.3 as Kirigami
 
 T.RadioButton {
     id: control
@@ -50,11 +50,20 @@
         control: control
     }
 
+    Kirigami.MnemonicData.enabled: control.enabled && control.visible
+    Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.ActionElement
+    Kirigami.MnemonicData.label: control.text
+    Shortcut {
+        //in case of explicit & the button manages it by itself
+        enabled: !(RegExp(/\&[^\&]/).test(control.text))
+        sequence: control.Kirigami.MnemonicData.sequence
+        onActivated: control.checked = true
+    }
     contentItem: Label {
         leftPadding: control.indicator && !control.mirrored ? 
control.indicator.width + control.spacing : 0
         rightPadding: control.indicator && control.mirrored ? 
control.indicator.width + control.spacing : 0
         opacity: control.enabled ? 1 : 0.6
-        text: control.text
+        text: control.Kirigami.MnemonicData.richTextLabel
         font: control.font
         color: Kirigami.Theme.textColor
         elide: Text.ElideRight
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.44.0/org.kde.desktop/Switch.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/Switch.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/Switch.qml    2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/Switch.qml    2018-04-07 
09:49:08.000000000 +0200
@@ -22,7 +22,7 @@
 
 import QtQuick 2.6
 import QtQuick.Templates @QQC2_VERSION@ as T
-import org.kde.kirigami 2.2 as Kirigami
+import org.kde.kirigami 2.3 as Kirigami
 
 T.CheckBox {
     id: control
@@ -48,11 +48,21 @@
         control: control
     }
 
+    Kirigami.MnemonicData.enabled: control.enabled && control.visible
+    Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.ActionElement
+    Kirigami.MnemonicData.label: control.text
+    Shortcut {
+        //in case of explicit & the button manages it by itself
+        enabled: !(RegExp(/\&[^\&]/).test(control.text))
+        sequence: control.Kirigami.MnemonicData.sequence
+        onActivated: control.toggle();
+    }
+
     contentItem: Label {
         leftPadding: control.indicator && !control.mirrored ? 
control.indicator.width + control.spacing : 0
         rightPadding: control.indicator && control.mirrored ? 
control.indicator.width + control.spacing : 0
         opacity: control.enabled ? 1 : 0.6
-        text: control.text
+        text: control.Kirigami.MnemonicData.richTextLabel
         font: control.font
         color: Kirigami.Theme.textColor
         elide: Text.ElideRight
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.44.0/org.kde.desktop/TabButton.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/TabButton.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/TabButton.qml 2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/TabButton.qml 2018-04-07 
09:49:08.000000000 +0200
@@ -26,7 +26,7 @@
 import QtQuick.Controls @QQC2_VERSION@
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
 import QtQuick.Templates @QQC2_VERSION@ as T
-import org.kde.kirigami 2.2 as Kirigami
+import org.kde.kirigami 2.3 as Kirigami
 
 T.TabButton {
     id: controlRoot
@@ -45,6 +45,15 @@
 
     contentItem: Item {}
 
+    Kirigami.MnemonicData.enabled: controlRoot.enabled && controlRoot.visible
+    Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.SecondaryControl
+    Kirigami.MnemonicData.label: controlRoot.text
+    Shortcut {
+        //in case of explicit & the button manages it by itself
+        enabled: !(RegExp(/\&[^\&]/).test(controlRoot.text))
+        sequence: controlRoot.Kirigami.MnemonicData.sequence
+        onActivated: controlRoot.checked = true;
+    }
     background: StylePrivate.StyleItem {
         id: styleitem
 
@@ -78,12 +87,13 @@
             "orientation": orientation,
             "tabpos": tabpos,
             "selectedpos": selectedpos,
-            "icon": control.icon ? (control.icon.name || control.icon.source) 
: ""
+            "icon": control.icon ? (control.icon.name || control.icon.source) 
: "",
+            "iconColor": controlRoot.icon && controlRoot.icon.color.a > 0? 
controlRoot.icon.color : Kirigami.Theme.textColor
         }
 
         enabled: controlRoot.enabled
         selected: controlRoot.checked
-        text: controlRoot.text
+        text: controlRoot.Kirigami.MnemonicData.mnemonicLabel
         hover: controlRoot.hovered
         hasFocus: controlRoot.activeFocus
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.44.0/org.kde.desktop/TextArea.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/TextArea.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/TextArea.qml  2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/TextArea.qml  2018-04-07 
09:49:08.000000000 +0200
@@ -45,8 +45,10 @@
     selectedTextColor: Kirigami.Theme.highlightedTextColor
     wrapMode: Text.WordWrap
     verticalAlignment: TextEdit.AlignTop
-    //Text.NativeRendering is broken on non integer pixel ratios
-    renderType: Window.devicePixelRatio % 1 !== 0 ? Text.QtRendering : 
Text.NativeRendering
+
+    // Work around Qt bug where NativeRendering breaks for non-integer scale 
factors
+    // https://bugreports.qt.io/browse/QTBUG-67007
+    renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : 
Text.NativeRendering
     selectByMouse: true
 
     Label {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.44.0/org.kde.desktop/TextField.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/TextField.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/TextField.qml 2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/TextField.qml 2018-04-07 
09:49:08.000000000 +0200
@@ -45,8 +45,10 @@
     selectionColor: Kirigami.Theme.highlightColor
     selectedTextColor: Kirigami.Theme.highlightedTextColor
     verticalAlignment: TextInput.AlignVCenter
-    //Text.NativeRendering is broken on non integer pixel ratios
-    renderType: Window.devicePixelRatio % 1 !== 0 ? Text.QtRendering : 
Text.NativeRendering
+
+    // Work around Qt bug where NativeRendering breaks for non-integer scale 
factors
+    // https://bugreports.qt.io/browse/QTBUG-67007
+    renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : 
Text.NativeRendering
     selectByMouse: true
 
     Controls.Label {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.44.0/org.kde.desktop/ToolButton.qml 
new/qqc2-desktop-style-5.45.0/org.kde.desktop/ToolButton.qml
--- old/qqc2-desktop-style-5.44.0/org.kde.desktop/ToolButton.qml        
2018-03-03 10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/org.kde.desktop/ToolButton.qml        
2018-04-07 09:49:08.000000000 +0200
@@ -22,7 +22,7 @@
 
 import QtQuick 2.6
 import QtQuick.Templates @QQC2_VERSION@ as T
-import org.kde.kirigami 2.2 as Kirigami
+import org.kde.kirigami 2.3 as Kirigami
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
 
 T.ToolButton {
@@ -30,25 +30,36 @@
     Kirigami.Theme.colorSet: flat ? Kirigami.Theme.Window : 
Kirigami.Theme.Button
     Kirigami.Theme.inherit: flat
 
-    implicitWidth: background.implicitWidth
+    implicitWidth: text.length > 0 ? background.implicitWidth : implicitHeight
     implicitHeight: background.implicitHeight
 
     hoverEnabled: true //Qt.styleHints.useHoverEffects TODO: how to make this 
work in 5.7?
 
     flat: true
     contentItem: Item {}
+    Kirigami.MnemonicData.enabled: controlRoot.enabled && controlRoot.visible
+    Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.SecondaryControl
+    Kirigami.MnemonicData.label: controlRoot.text
+    Shortcut {
+        //in case of explicit & the button manages it by itself
+        enabled: !(RegExp(/\&[^\&]/).test(controlRoot.text))
+        sequence: controlRoot.Kirigami.MnemonicData.sequence
+        onActivated: controlRoot.clicked()
+    }
     background: StylePrivate.StyleItem {
         id: styleitem
+        anchors.fill:parent
         control: controlRoot
         elementType: controlRoot.flat ? "toolbutton" : "button"
         sunken: controlRoot.pressed || (controlRoot.checkable && 
controlRoot.checked)
         raised: !(controlRoot.pressed || (controlRoot.checkable && 
controlRoot.checked))
         hover: controlRoot.hovered
-        text: controlRoot.text
+        text: controlRoot.Kirigami.MnemonicData.mnemonicLabel
         hasFocus: false
         activeControl: controlRoot.isDefault ? "default" : "f"
         properties: {
-            "icon": controlRoot.icon ? (controlRoot.icon.name || 
controlRoot.icon.source) : ""
+            "icon": controlRoot.icon ? (controlRoot.icon.name || 
controlRoot.icon.source) : "",
+            "iconColor": controlRoot.icon && controlRoot.icon.color.a > 0? 
controlRoot.icon.color : Kirigami.Theme.textColor
         }
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.44.0/plugin/kquickstyleitem.cpp 
new/qqc2-desktop-style-5.45.0/plugin/kquickstyleitem.cpp
--- old/qqc2-desktop-style-5.44.0/plugin/kquickstyleitem.cpp    2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/plugin/kquickstyleitem.cpp    2018-04-07 
09:49:08.000000000 +0200
@@ -48,11 +48,7 @@
 #include <qstyleoption.h>
 #include <qapplication.h>
 #include <qquickwindow.h>
-#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
 #include <QtQuick/qsgninepatchnode.h>
-#else
-#include "qsgdefaultninepatchnode_p.h"
-#endif
 
 #include <Kirigami2/PlatformTheme>
 
@@ -923,7 +919,8 @@
         break;
     default:
         break;
-    }    return size;
+    }
+    return size.expandedTo(QSize(m_contentWidth, m_contentHeight));
 }
 
 qreal KQuickStyleItem::baselineOffset()
@@ -1555,10 +1552,29 @@
 
     if (m_control) {
         m_control->removeEventFilter(this);
+        disconnect(m_control, 0, this, 0);
     }
 
     m_control = control;
-    m_control->installEventFilter(this);
+
+    if (m_control) {
+        m_control->installEventFilter(this);
+    
+        if (m_control->window()) {
+            m_window = m_control->window();
+            m_window->installEventFilter(this);
+        }
+        connect(m_control, &QQuickItem::windowChanged, this,
+                [this](QQuickWindow *window) {
+            if (m_window) {
+                m_window->removeEventFilter(this);
+            }
+            m_window = window;
+            if (m_window) {
+                m_window->installEventFilter(this);
+            }
+        });
+    }
 
     emit controlChanged();
 }
@@ -1572,11 +1588,7 @@
 
     QSGNinePatchNode *styleNode = static_cast<QSGNinePatchNode *>(node);
     if (!styleNode)
-#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
         styleNode = window()->createNinePatchNode();
-#else
-        styleNode = new QSGDefaultNinePatchNode;
-#endif
 
 #ifdef QSG_RUNTIME_DESCRIPTION
     qsgnode_set_description(styleNode,
@@ -1616,9 +1628,19 @@
 
 bool KQuickStyleItem::eventFilter(QObject *watched, QEvent *event)
 {
-    if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut) 
{
-        QFocusEvent *fe = static_cast<QFocusEvent *>(event);
-        m_lastFocusReason = fe->reason();
+    if (watched == m_control) {
+        if (event->type() == QEvent::FocusIn || event->type() == 
QEvent::FocusOut) {
+            QFocusEvent *fe = static_cast<QFocusEvent *>(event);
+            m_lastFocusReason = fe->reason();
+        }
+    } else if (watched == m_window.data()) {
+        if (event->type() == QEvent::KeyPress || event->type() == 
QEvent::KeyRelease) {
+            QKeyEvent *ke = static_cast<QKeyEvent *>(event);
+            if (ke->key() == Qt::Key_Alt) {
+                updateItem();
+            }
+
+        }
     }
 
     return QQuickItem::eventFilter(watched, event);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.44.0/plugin/kquickstyleitem_p.h 
new/qqc2-desktop-style-5.45.0/plugin/kquickstyleitem_p.h
--- old/qqc2-desktop-style-5.44.0/plugin/kquickstyleitem_p.h    2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/plugin/kquickstyleitem_p.h    2018-04-07 
09:49:08.000000000 +0200
@@ -277,6 +277,7 @@
     Kirigami::PlatformTheme *m_theme = nullptr;
     QStyleOption *m_styleoption;
     QPointer<QQuickItem> m_control;
+    QPointer<QWindow> m_window;
     Type m_itemType;
 
     QString m_type;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.44.0/tests/buttonIcons.qml 
new/qqc2-desktop-style-5.45.0/tests/buttonIcons.qml
--- old/qqc2-desktop-style-5.44.0/tests/buttonIcons.qml 2018-03-03 
10:54:13.000000000 +0100
+++ new/qqc2-desktop-style-5.45.0/tests/buttonIcons.qml 2018-04-07 
09:49:08.000000000 +0200
@@ -24,8 +24,11 @@
 import org.kde.kirigami 2.2 as Kirigami
 
 Kirigami.ApplicationWindow {
+    id: root
     width: 600
     height: 600
+    Kirigami.Theme.inherit: false
+    Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
     header: Controls.MenuBar {
         Controls.Menu {
             title: "&File"
@@ -64,7 +67,7 @@
             }
         }
         Controls.Menu {
-            title: "&Edit"
+            title: "Edit"
 
             Controls.MenuItem {
                 text: "Item1"
@@ -76,48 +79,72 @@
             }
         }
     }
-    ColumnLayout {
+    Rectangle {
+        id: background
         anchors.centerIn: parent
-        Controls.Button {
-            id: coloredIconButton
-            text: "text"
-            icon.name: "go-previous"
-        }
-        RowLayout {
-            Controls.Label {
-                text: "RGB color for icon:"
-            }
-            Controls.SpinBox{
-                id: red
-                editable: true
-                from: 0
-                to: 255
-                onValueModified: {
-                    coloredIconButton.icon.color = Qt.rgba(red.value/255, 
green.value/255, blue.value/255, 1);
-                }
-            }
-            Controls.SpinBox{
-                id: green
-                editable: true
-                from: 0
-                to: 255
-                onValueModified: {
-                    coloredIconButton.icon.color = Qt.rgba(red.value/255, 
green.value/255, blue.value/255, 1);
-                }
-            }
-            Controls.SpinBox{
-                id: blue
-                editable: true
-                from: 0
-                to: 255
-                onValueModified: {
-                    coloredIconButton.icon.color = Qt.rgba(red.value/255, 
green.value/255, blue.value/255, 1);
-                }
+        Kirigami.Theme.inherit: false
+        Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
+
+        width: childrenRect.width
+        height: childrenRect.height
+        color: Kirigami.Theme.backgroundColor
+
+        ColumnLayout {
+
+            Controls.ComboBox {
+                Kirigami.Theme.inherit: true
+                currentIndex: 1
+                model: ["View", "Window", "Button", "Selection", "Tooltip", 
"Complementary"]
+                onCurrentTextChanged: background.Kirigami.Theme.colorSet = 
currentText
+            }
+            Controls.Button {
+                
+                Kirigami.Theme.inherit: true
+                text: "text"
+                icon.name: "go-previous"
+            }
+            Controls.Button {
+                id: coloredIconButton
+                text: "text"
+                icon.name: "go-previous"
+            }
+            RowLayout {
+                Controls.Label {
+                    text: "RGB color for icon:"
+                }
+                Controls.SpinBox{
+                    id: red
+                    editable: true
+                    from: 0
+                    to: 255
+                    onValueModified: {
+                        coloredIconButton.icon.color = Qt.rgba(red.value/255, 
green.value/255, blue.value/255, 1);
+                    }
+                }
+                Controls.SpinBox{
+                    id: green
+                    Kirigami.Theme.inherit: true
+                    editable: true
+                    from: 0
+                    to: 255
+                    onValueModified: {
+                        coloredIconButton.icon.color = Qt.rgba(red.value/255, 
green.value/255, blue.value/255, 1);
+                    }
+                }
+                Controls.SpinBox{
+                    id: blue
+                    editable: true
+                    from: 0
+                    to: 255
+                    onValueModified: {
+                        coloredIconButton.icon.color = Qt.rgba(red.value/255, 
green.value/255, blue.value/255, 1);
+                    }
+                }
+            }
+            Controls.ToolButton {
+                text: "text"
+                icon.name: "go-previous"
             }
         }
-        Controls.ToolButton {
-            text: "text"
-            icon.name: "go-previous"
-        }
     }
 }


Reply via email to