Hello community,

here is the log from the commit of package qqc2-desktop-style for 
openSUSE:Factory checked in at 2017-10-27 13:59:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 Oct 27 13:59:55 2017 rev:2 rq:536378 version:5.39.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/qqc2-desktop-style/qqc2-desktop-style.changes    
2017-09-11 16:18:03.664557493 +0200
+++ 
/work/SRC/openSUSE:Factory/.qqc2-desktop-style.new/qqc2-desktop-style.changes   
    2017-10-27 13:59:56.600162859 +0200
@@ -1,0 +2,10 @@
+Mon Oct 23 06:41:48 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:
+  * Too many to list here
+
+-------------------------------------------------------------------

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

New:
----
  qqc2-desktop-style-5.39.0.tar.xz

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

Other differences:
------------------
++++++ qqc2-desktop-style.spec ++++++
--- /var/tmp/diff_new_pack.H0XXND/_old  2017-10-27 13:59:58.040095548 +0200
+++ /var/tmp/diff_new_pack.H0XXND/_new  2017-10-27 13:59:58.044095361 +0200
@@ -16,17 +16,21 @@
 #
 
 
+%define _tar_path 5.39
 Name:           qqc2-desktop-style
-Version:        5.10.95
+Version:        5.39.0
 Release:        0
 Summary:        A Qt Quick Controls 2 Style for Desktop UIs
 License:        GPL-2.0+
 Group:          Development/Libraries/KDE
 Url:            http://www.kde.org/
-Source:         
https://download.kde.org/unstable/qqc2-desktop-style/qqc2-desktop-style-%{version}.tar.xz
+Source:         
https://download.kde.org/stable/frameworks/%{_tar_path}/qqc2-desktop-style-%{version}.tar.xz
 BuildRequires:  extra-cmake-modules >= 0.0.8
 BuildRequires:  kf5-filesystem
 # For dir ownership
+BuildRequires:  kconfigwidgets-devel
+BuildRequires:  kiconthemes-devel
+BuildRequires:  kirigami2-devel
 BuildRequires:  libqt5-qtquickcontrols2
 BuildRequires:  cmake(Qt5Core) >= 5.9.1
 BuildRequires:  cmake(Qt5Gui)
@@ -34,13 +38,15 @@
 BuildRequires:  cmake(Qt5Quick)
 BuildRequires:  cmake(Qt5Svg)
 BuildRequires:  cmake(Qt5Widgets)
+# For KUA users
+Provides:       plasma5-qqc2-style = %{version}
+Obsoletes:      plasma5-qqc2-style < %{version}
 Requires:       libqt5-qtquickcontrols2
 # plasma5-workspace sets up the env variables so that this theme
 # is picked by default. It still works fine without it (no requires),
 # but looks better with it. By itself plasma5-workspace does not use
 # it (yet), so only install it with libqt5-qtquickcontrols2.
-## Not yet enabled, will be once out of beta
-#Supplements:    packageand(plasma5-workspace:libqt5-qtquickcontrols2)
+Supplements:    packageand(plasma5-workspace:libqt5-qtquickcontrols2)
 
 %description
 A Qt Quick Controls 2 style engine that uses the desktop style
@@ -72,6 +78,8 @@
 %{_kf5_qmldir}/QtQuick/Controls.2/org.kde.desktop/
 %dir %{_kf5_qmldir}/org/
 %dir %{_kf5_qmldir}/org/kde/
+%dir %{_kf5_plugindir}/kf5/kirigami/
+%{_kf5_plugindir}/kf5/kirigami/org.kde.desktop.so
 %{_kf5_qmldir}/org/kde/qqc2desktopstyle/
 
 %files devel

++++++ qqc2-desktop-style-5.10.95.tar.xz -> qqc2-desktop-style-5.39.0.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.10.95/CMakeLists.txt 
new/qqc2-desktop-style-5.39.0/CMakeLists.txt
--- old/qqc2-desktop-style-5.10.95/CMakeLists.txt       2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/CMakeLists.txt        2017-10-07 
19:35:04.000000000 +0200
@@ -1,11 +1,11 @@
-project(qqc2-desktop-style)
+cmake_minimum_required(VERSION 3.0)
 
-cmake_minimum_required(VERSION 2.8.12)
+set(KF5_VERSION "5.39.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.39.0") # handled by release scripts
 
-set(KF5_VERSION "5.37.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.37.0") # handled by release scripts
+project(qqc2-desktop-style VERSION ${KF5_VERSION})
 
-set(QT_MIN_VERSION "5.7.0")
+set(REQUIRED_QT_VERSION "5.7.0")
 
 ################# Disallow in-source build #################
 
@@ -21,7 +21,7 @@
 
 ################# set KDE specific information #################
 
-find_package(ECM 0.0.8 REQUIRED NO_MODULE)
+find_package(ECM 5.39.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})
@@ -32,7 +32,22 @@
 include(KDECMakeSettings)
 include(KDECompilerSettings NO_POLICY_SCOPE)
 
-find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick 
Gui Widgets)
+find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Core 
Quick Gui Widgets)
+
+find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS Kirigami2)
+
+find_package(KF5 ${KF5_DEP_VERSION} COMPONENTS
+                IconThemes #KIconLoader
+                ConfigWidgets #KColorScheme
+            )
+set_package_properties(IconThemes PROPERTIES DESCRIPTION "KF5 IconThemes 
framework"
+                       TYPE OPTIONAL
+                       PURPOSE "Optional integration of Kirigami with 
KIconLoader icons handling for a better integration with Plasma Desktop"
+                      )
+set_package_properties(ConfigWidgets PROPERTIES DESCRIPTION "KF5 WidgetAddons 
framework"
+                       TYPE OPTIONAL
+                       PURPOSE "Optional integration of Kirigami with 
KColorScheme for color palettes integration with Plasma Desktop"
+                      )
 
 find_package(PkgConfig)
 
@@ -53,7 +68,7 @@
 )
 
 
-ecm_setup_version(${KF5_VERSION}
+ecm_setup_version(PROJECT
     VARIABLE_PREFIX QQC2DESKTOPSTYLE
     VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/qqc2desktopstyle_version.h"
     PACKAGE_VERSION_FILE 
"${CMAKE_CURRENT_BINARY_DIR}/KF5QQC2DeskopStyleConfigVersion.cmake"
@@ -63,6 +78,10 @@
 
 add_subdirectory(plugin)
 
+if (KF5IconThemes_FOUND AND KF5WidgetsAddons_FOUND)
+add_subdirectory(kirigami-plasmadesktop-integration)
+endif(KF5IconThemes_FOUND AND KF5WidgetsAddons_FOUND)
+
 install(DIRECTORY org.kde.desktop DESTINATION 
${KDE_INSTALL_QMLDIR}/QtQuick/Controls.2)
 
 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/CMakeLists.txt
 new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/CMakeLists.txt
--- 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/CMakeLists.txt
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/CMakeLists.txt 
    2017-10-07 19:35:04.000000000 +0200
@@ -0,0 +1,23 @@
+
+
+set(org.kde.desktop_SRCS
+    plasmadesktoptheme.cpp
+    kirigamiplasmafactory.cpp
+)
+
+
+add_library(org.kde.desktop MODULE ${org.kde.desktop_SRCS})
+
+target_link_libraries(org.kde.desktop
+    PUBLIC
+        Qt5::Core
+        KF5::Kirigami2
+    PRIVATE
+        Qt5::Qml
+        Qt5::Quick
+        KF5::ConfigWidgets
+        KF5::IconThemes
+)
+
+install(TARGETS org.kde.desktop DESTINATION 
${KDE_INSTALL_PLUGINDIR}/kf5/kirigami)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/kirigamiplasmafactory.cpp
 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.cpp
--- 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/kirigamiplasmafactory.cpp
 1970-01-01 01:00:00.000000000 +0100
+++ 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.cpp
  2017-10-07 19:35:04.000000000 +0200
@@ -0,0 +1,38 @@
+/*
+*   Copyright (C) 2017 by Marco Martin <[email protected]>
+*
+*   This program is free software; you can redistribute it and/or modify
+*   it under the terms of the GNU Library General Public License as
+*   published by the Free Software Foundation; either version 2, or
+*   (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU Library General Public License for more details
+*
+*   You should have received a copy of the GNU Library General Public
+*   License along with this program; if not, write to the
+*   Free Software Foundation, Inc.,
+*   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*/
+
+#include "kirigamiplasmafactory.h"
+#include "plasmadesktoptheme.h"
+
+KirigamiPlasmaFactory::KirigamiPlasmaFactory(QObject *parent)
+    : Kirigami::KirigamiPluginFactory(parent)
+{
+}
+
+KirigamiPlasmaFactory::~KirigamiPlasmaFactory()
+{
+}
+
+Kirigami::PlatformTheme *KirigamiPlasmaFactory::createPlatformTheme(QObject 
*parent)
+{
+    Q_ASSERT(parent);
+    return new PlasmaDesktopTheme(parent);
+}
+
+#include "moc_kirigamiplasmafactory.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/kirigamiplasmafactory.h
 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.h
--- 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/kirigamiplasmafactory.h
   1970-01-01 01:00:00.000000000 +0100
+++ 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.h
    2017-10-07 19:35:04.000000000 +0200
@@ -0,0 +1,43 @@
+/*
+*   Copyright (C) 2017 by Marco Martin <[email protected]>
+*
+*   This program is free software; you can redistribute it and/or modify
+*   it under the terms of the GNU Library General Public License as
+*   published by the Free Software Foundation; either version 2, or
+*   (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU Library General Public License for more details
+*
+*   You should have received a copy of the GNU Library General Public
+*   License along with this program; if not, write to the
+*   Free Software Foundation, Inc.,
+*   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*/
+
+#ifndef KIRIGAMIPLASMAFACTORY_H
+#define KIRIGAMIPLASMAFACTORY_H
+
+#include <Kirigami2/KirigamiPluginFactory>
+#include <QObject>
+
+class KirigamiPlasmaFactory : public Kirigami::KirigamiPluginFactory
+{
+    Q_OBJECT
+
+    Q_PLUGIN_METADATA(IID "org.kde.kirigami.KirigamiPluginFactory" FILE 
"kirigamiplasmaintegration.json")
+
+    Q_INTERFACES(Kirigami::KirigamiPluginFactory)
+
+public:
+    explicit KirigamiPlasmaFactory(QObject *parent = nullptr);
+    ~KirigamiPlasmaFactory();
+
+    Kirigami::PlatformTheme *createPlatformTheme(QObject *parent) 
Q_DECL_OVERRIDE;
+};
+
+
+
+#endif // KIRIGAMIPLASMAFACTORY_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/kirigamiplasmaintegration.json
 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/kirigamiplasmaintegration.json
--- 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/kirigamiplasmaintegration.json
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/kirigamiplasmaintegration.json
     2017-10-07 19:35:04.000000000 +0200
@@ -0,0 +1 @@
+{}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
--- 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
     2017-10-07 19:35:04.000000000 +0200
@@ -0,0 +1,252 @@
+/*
+*   Copyright (C) 2017 by Marco Martin <[email protected]>
+*
+*   This program is free software; you can redistribute it and/or modify
+*   it under the terms of the GNU Library General Public License as
+*   published by the Free Software Foundation; either version 2, or
+*   (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU Library General Public License for more details
+*
+*   You should have received a copy of the GNU Library General Public
+*   License along with this program; if not, write to the
+*   Free Software Foundation, Inc.,
+*   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*/
+
+#include "plasmadesktoptheme.h"
+#include <QQmlEngine>
+#include <QQmlContext>
+#include <QGuiApplication>
+#include <QPalette>
+#include <QDebug>
+#include <QQuickWindow>
+#include <QTimer>
+#include <KIconLoader>
+
+#include <KColorScheme>
+
+class IconLoaderSingleton
+{
+public:
+    IconLoaderSingleton()
+    {}
+
+    KIconLoader self;
+};
+
+Q_GLOBAL_STATIC(IconLoaderSingleton, privateIconLoaderSelf)
+
+PlasmaDesktopTheme::PlasmaDesktopTheme(QObject *parent)
+    : PlatformTheme(parent)
+{
+    m_parentItem = qobject_cast<QQuickItem *>(parent);
+
+    //null in case parent is a normal QObject
+    if (m_parentItem) {
+        connect(m_parentItem.data(), &QQuickItem::enabledChanged,
+                this, &PlasmaDesktopTheme::syncColors);
+        if (m_parentItem && m_parentItem->window()) {
+            connect(m_parentItem->window(), &QWindow::activeChanged,
+                    this, &PlasmaDesktopTheme::syncColors);
+            m_window = m_parentItem->window();
+        }
+        connect(m_parentItem.data(), &QQuickItem::windowChanged,
+                this, [this]() {
+                    if (m_window) {
+                        disconnect(m_window.data(), &QWindow::activeChanged,
+                                this, &PlasmaDesktopTheme::syncColors);
+                    }
+                    if (m_parentItem && m_parentItem->window()) {
+                        connect(m_parentItem->window(), 
&QWindow::activeChanged,
+                                this, &PlasmaDesktopTheme::syncColors);
+                    }
+                    syncColors();
+                });
+    }
+
+    //TODO: correct? depends from https://codereview.qt-project.org/206889
+    connect(qApp, &QGuiApplication::fontDatabaseChanged, this, [this]() 
{setDefaultFont(qApp->font());});
+
+    connect(this, &PlasmaDesktopTheme::colorSetChanged,
+            this, &PlasmaDesktopTheme::syncColors);
+    connect(qApp, &QGuiApplication::paletteChanged,
+            this, &PlasmaDesktopTheme::syncColors);
+
+    syncColors();
+}
+
+PlasmaDesktopTheme::~PlasmaDesktopTheme()
+{
+}
+
+QIcon PlasmaDesktopTheme::iconFromTheme(const QString &name, const QColor 
&customColor)
+{
+    QPalette pal = palette();
+    if (customColor != Qt::transparent) {
+        static const QPalette::ColorGroup states[3] = { QPalette::Active, 
QPalette::Inactive, QPalette::Disabled };
+        for (int i = 0; i < 3; i++) {
+            QPalette::ColorGroup state = states[i];
+            pal.setBrush(state, QPalette::WindowText, customColor);
+        }
+    }
+
+    privateIconLoaderSelf->self.setCustomPalette(pal);
+
+    return KDE::icon(name, &privateIconLoaderSelf->self);
+}
+
+void PlasmaDesktopTheme::syncColors()
+{
+    KColorScheme::ColorSet set;
+
+    switch (colorSet()) {
+    case PlatformTheme::Button:
+        set = KColorScheme::ColorSet::Button;
+        break;
+    case PlatformTheme::Selection:
+        set = KColorScheme::ColorSet::Selection;
+        break;
+    case PlatformTheme::Tooltip:
+        set = KColorScheme::ColorSet::Tooltip;
+        break;
+    case PlatformTheme::View:
+        set = KColorScheme::ColorSet::View;
+        break;
+    case PlatformTheme::Complementary:
+        set = KColorScheme::ColorSet::Complementary;
+        break;
+    case PlatformTheme::Window:
+    default:
+        set = KColorScheme::ColorSet::Window;
+    }
+
+    QPalette::ColorGroup group = QPalette::Active;
+    if (m_parentItem) {
+        if (!m_parentItem->isEnabled()) {
+            group = QPalette::Disabled;
+        } else if (m_parentItem->window() && 
!m_parentItem->window()->isActive()) {
+            group = QPalette::Inactive;
+        }
+    }
+
+    const KColorScheme selectionScheme(group, 
KColorScheme::ColorSet::Selection);
+    const KColorScheme scheme(group, set);
+
+    //foreground
+    setTextColor(scheme.foreground(KColorScheme::NormalText).color());
+    
setDisabledTextColor(scheme.foreground(KColorScheme::InactiveText).color());
+    
setHighlightedTextColor(selectionScheme.foreground(KColorScheme::NormalText).color());
+    setActiveTextColor(scheme.foreground(KColorScheme::ActiveText).color());
+    setLinkColor(scheme.foreground(KColorScheme::LinkText).color());
+    setVisitedLinkColor(scheme.foreground(KColorScheme::VisitedText).color());
+    
setNegativeTextColor(scheme.foreground(KColorScheme::NegativeText).color());
+    setNeutralTextColor(scheme.foreground(KColorScheme::NeutralText).color());
+    
setPositiveTextColor(scheme.foreground(KColorScheme::PositiveText).color());
+    
+
+    //background
+    
setBackgroundColor(scheme.background(KColorScheme::NormalBackground).color());
+    
setHighlightColor(selectionScheme.background(KColorScheme::NormalBackground).color());
+
+    //decoration
+    setHoverColor(scheme.decoration(KColorScheme::HoverColor).color());
+    setFocusColor(scheme.decoration(KColorScheme::FocusColor).color());
+
+    QPalette pal = palette();
+    static const QPalette::ColorGroup states[3] = { QPalette::Active, 
QPalette::Inactive, QPalette::Disabled };
+    for (int i = 0; i < 3; i++) {
+        QPalette::ColorGroup state = states[i];
+        pal.setBrush(state, QPalette::WindowText, scheme.foreground());
+        pal.setBrush(state, QPalette::Window, scheme.background());
+        pal.setBrush(state, QPalette::Base, scheme.background());
+        pal.setBrush(state, QPalette::Text, scheme.foreground());
+        pal.setBrush(state, QPalette::Button, scheme.background());
+        pal.setBrush(state, QPalette::ButtonText, scheme.foreground());
+        pal.setBrush(state, QPalette::Highlight, selectionScheme.background());
+        pal.setBrush(state, QPalette::HighlightedText, 
selectionScheme.foreground());
+        pal.setBrush(state, QPalette::ToolTipBase, scheme.background());
+        pal.setBrush(state, QPalette::ToolTipText, scheme.foreground());
+
+        pal.setColor(state, QPalette::Light, 
scheme.shade(KColorScheme::LightShade));
+        pal.setColor(state, QPalette::Midlight, 
scheme.shade(KColorScheme::MidlightShade));
+        pal.setColor(state, QPalette::Mid, 
scheme.shade(KColorScheme::MidShade));
+        pal.setColor(state, QPalette::Dark, 
scheme.shade(KColorScheme::DarkShade));
+        pal.setColor(state, QPalette::Shadow, 
scheme.shade(KColorScheme::ShadowShade));
+
+        pal.setBrush(state, QPalette::AlternateBase, 
scheme.background(KColorScheme::AlternateBackground));
+        pal.setBrush(state, QPalette::Link, 
scheme.foreground(KColorScheme::LinkText));
+        pal.setBrush(state, QPalette::LinkVisited, 
scheme.foreground(KColorScheme::VisitedText));
+    }
+    setPalette(pal);
+            
+
+    //legacy stuff
+    const KColorScheme buttonScheme(QPalette::Active, 
KColorScheme::ColorSet::Button);
+    m_buttonTextColor = 
buttonScheme.foreground(KColorScheme::NormalText).color();
+    m_buttonBackgroundColor = 
buttonScheme.background(KColorScheme::NormalBackground).color();
+    m_buttonHoverColor = 
buttonScheme.decoration(KColorScheme::HoverColor).color();
+    m_buttonFocusColor = 
buttonScheme.decoration(KColorScheme::FocusColor).color();
+
+    const KColorScheme viewScheme(QPalette::Active, 
KColorScheme::ColorSet::View);
+    m_viewTextColor = viewScheme.foreground(KColorScheme::NormalText).color();
+    m_viewBackgroundColor = 
viewScheme.background(KColorScheme::NormalBackground).color();
+    m_viewHoverColor = viewScheme.decoration(KColorScheme::HoverColor).color();
+    m_viewFocusColor = viewScheme.decoration(KColorScheme::FocusColor).color();
+
+    emit colorsChanged();
+}
+
+QColor PlasmaDesktopTheme::buttonTextColor() const
+{
+    qWarning()<<"WARNING: buttonTextColor is deprecated, use textColor with 
colorSet: Theme.Button instead";
+    return m_buttonTextColor;
+}
+
+QColor PlasmaDesktopTheme::buttonBackgroundColor() const
+{
+    qWarning()<<"WARNING: buttonBackgroundColor is deprecated, use 
backgroundColor with colorSet: Theme.Button instead";
+    return m_buttonBackgroundColor;
+}
+
+QColor PlasmaDesktopTheme::buttonHoverColor() const
+{
+    qWarning()<<"WARNING: buttonHoverColor is deprecated, use backgroundColor 
with colorSet: Theme.Button instead";
+    return m_buttonHoverColor;
+}
+
+QColor PlasmaDesktopTheme::buttonFocusColor() const
+{
+    qWarning()<<"WARNING: buttonFocusColor is deprecated, use backgroundColor 
with colorSet: Theme.Button instead";
+    return m_buttonFocusColor;
+}
+
+
+QColor PlasmaDesktopTheme::viewTextColor() const
+{
+    qWarning()<<"WARNING: viewTextColor is deprecated, use backgroundColor 
with colorSet: Theme.View instead";
+    return m_viewTextColor;
+}
+
+QColor PlasmaDesktopTheme::viewBackgroundColor() const
+{
+    qWarning()<<"WARNING: viewBackgroundColor is deprecated, use 
backgroundColor with colorSet: Theme.View instead";
+    return m_viewBackgroundColor;
+}
+
+QColor PlasmaDesktopTheme::viewHoverColor() const
+{
+    qWarning()<<"WARNING: viewHoverColor is deprecated, use backgroundColor 
with colorSet: Theme.View instead";
+    return m_viewHoverColor;
+}
+
+QColor PlasmaDesktopTheme::viewFocusColor() const
+{
+    qWarning()<<"WARNING: viewFocusColor is deprecated, use backgroundColor 
with colorSet: Theme.View instead";
+    return m_viewFocusColor;
+}
+
+#include "moc_plasmadesktoptheme.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/plasmadesktoptheme.h
 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.h
--- 
old/qqc2-desktop-style-5.10.95/kirigami-plasmadesktop-integration/plasmadesktoptheme.h
      1970-01-01 01:00:00.000000000 +0100
+++ 
new/qqc2-desktop-style-5.39.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.h
       2017-10-07 19:35:04.000000000 +0200
@@ -0,0 +1,83 @@
+/*
+*   Copyright (C) 2017 by Marco Martin <[email protected]>
+*
+*   This program is free software; you can redistribute it and/or modify
+*   it under the terms of the GNU Library General Public License as
+*   published by the Free Software Foundation; either version 2, or
+*   (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU Library General Public License for more details
+*
+*   You should have received a copy of the GNU Library General Public
+*   License along with this program; if not, write to the
+*   Free Software Foundation, Inc.,
+*   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*/
+
+#ifndef KIRIGAMIPLASMATHEME_H
+#define KIRIGAMIPLASMATHEME_H
+
+#include <Kirigami2/PlatformTheme>
+#include <QObject>
+#include <QQuickItem>
+#include <QColor>
+#include <QPointer>
+
+class PlasmaDesktopTheme;
+class KIconLoader;
+
+class PlasmaDesktopTheme : public Kirigami::PlatformTheme
+{
+    Q_OBJECT
+
+    // colors
+    Q_PROPERTY(QColor buttonTextColor READ buttonTextColor NOTIFY 
colorsChanged)
+    Q_PROPERTY(QColor buttonBackgroundColor READ buttonBackgroundColor NOTIFY 
colorsChanged)
+    Q_PROPERTY(QColor buttonHoverColor READ buttonHoverColor NOTIFY 
colorsChanged)
+    Q_PROPERTY(QColor buttonFocusColor READ buttonFocusColor NOTIFY 
colorsChanged)
+
+    Q_PROPERTY(QColor viewTextColor READ viewTextColor NOTIFY colorsChanged)
+    Q_PROPERTY(QColor viewBackgroundColor READ viewBackgroundColor NOTIFY 
colorsChanged)
+    Q_PROPERTY(QColor viewHoverColor READ viewHoverColor NOTIFY colorsChanged)
+    Q_PROPERTY(QColor viewFocusColor READ viewFocusColor NOTIFY colorsChanged)
+
+public:
+    explicit PlasmaDesktopTheme(QObject *parent = 0);
+    ~PlasmaDesktopTheme();
+
+    Q_INVOKABLE QIcon iconFromTheme(const QString &name, const QColor 
&customColor = Qt::transparent) Q_DECL_OVERRIDE;
+
+    void syncColors();
+
+    QColor buttonTextColor() const;
+    QColor buttonBackgroundColor() const;
+    QColor buttonHoverColor() const;
+    QColor buttonFocusColor() const;
+
+    QColor viewTextColor() const;
+    QColor viewBackgroundColor() const;
+    QColor viewHoverColor() const;
+    QColor viewFocusColor() const;
+
+Q_SIGNALS:
+    void colorsChanged();
+
+private:
+    QPointer<QQuickItem> m_parentItem;
+    QPointer<QWindow> m_window;
+    //legacy colors
+    QColor m_buttonTextColor;
+    QColor m_buttonBackgroundColor;
+    QColor m_buttonHoverColor;
+    QColor m_buttonFocusColor;
+    QColor m_viewTextColor;
+    QColor m_viewBackgroundColor;
+    QColor m_viewHoverColor;
+    QColor m_viewFocusColor;
+};
+
+
+#endif // KIRIGAMIPLASMATHEME_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.10.95/metainfo.yaml 
new/qqc2-desktop-style-5.39.0/metainfo.yaml
--- old/qqc2-desktop-style-5.10.95/metainfo.yaml        2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/metainfo.yaml 2017-10-07 19:35:04.000000000 
+0200
@@ -1,6 +1,6 @@
 maintainer: mart
 description: QtQuickControls 2 style that integrates with the desktop
-tier: 1
+tier: 3
 type: functional
 platforms:
     - name: Linux
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/Button.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/Button.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/Button.qml   2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/Button.qml    2017-10-07 
19:35:04.000000000 +0200
@@ -22,9 +22,12 @@
 import QtQuick 2.6
 import QtQuick.Templates 2.0 as T
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.Button {
     id: controlRoot
+    Kirigami.Theme.colorSet: Kirigami.Theme.Button
+    Kirigami.Theme.inherit: false
 
     implicitWidth: background.implicitWidth
     implicitHeight: background.implicitHeight
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/CheckBox.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/CheckBox.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/CheckBox.qml 2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/CheckBox.qml  2017-10-07 
19:35:04.000000000 +0200
@@ -23,7 +23,7 @@
 import QtQuick 2.6
 import QtQuick.Templates 2.0 as T
 import QtQuick.Controls 2.0
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.CheckBox {
     id: controlRoot
@@ -36,7 +36,7 @@
     baselineOffset: contentItem.y + contentItem.baselineOffset
 
     padding: 1
-    spacing: Math.round(StylePrivate.TextSingleton.height / 8)
+    spacing: Kirigami.Units.smallSpacing
 
     hoverEnabled: true
 
@@ -56,7 +56,6 @@
         opacity: controlRoot.enabled ? 1 : 0.6
         text: controlRoot.text
         font: controlRoot.font
-        color: StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
         elide: Text.ElideRight
         visible: controlRoot.text
         horizontalAlignment: Text.AlignLeft
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/CheckDelegate.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/CheckDelegate.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/CheckDelegate.qml    
2017-09-06 16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/CheckDelegate.qml     
2017-10-07 19:35:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 import QtQuick 2.5
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 import "private"
 
 T.CheckDelegate {
@@ -43,7 +43,7 @@
 
         text: controlRoot.text
         font: controlRoot.font
-        color: (controlRoot.pressed && !controlRoot.checked && 
!controlRoot.sectionDelegate) ? 
StylePrivate.SystemPaletteSingleton.highlightedText(controlRoot.enabled) : 
StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
+        color: (controlRoot.pressed && !controlRoot.checked && 
!controlRoot.sectionDelegate) ? Kirigami.Theme.highlightedTextColor : 
Kirigami.Theme.textColor
         elide: Text.ElideRight
         visible: controlRoot.text
         horizontalAlignment: Text.AlignLeft
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/ComboBox.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/ComboBox.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/ComboBox.qml 2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/ComboBox.qml  2017-10-07 
19:35:04.000000000 +0200
@@ -26,9 +26,12 @@
 import QtQuick.Controls 2.0 as Controls
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
 import QtGraphicalEffects 1.0
+import org.kde.kirigami 2.2 as Kirigami
 
 T.ComboBox {
     id: controlRoot
+    Kirigami.Theme.colorSet: Kirigami.Theme.Button
+    Kirigami.Theme.inherit: false
 
     implicitWidth: background.implicitWidth + leftPadding + rightPadding
     implicitHeight: background.implicitHeight
@@ -44,6 +47,8 @@
         text: controlRoot.textRole ? (Array.isArray(controlRoot.model) ? 
modelData[controlRoot.textRole] : model[controlRoot.textRole]) : modelData
         highlighted: controlRoot.highlightedIndex == index
         property bool separatorVisible: false
+        Kirigami.Theme.colorSet: controlRoot.Kirigami.Theme.inherit ? 
controlRoot.Kirigami.Theme.colorSet : Kirigami.Theme.View
+        Kirigami.Theme.inherit: controlRoot.Kirigami.Theme.inherit
     }
 
     indicator: Item {}
@@ -76,6 +81,8 @@
         implicitHeight: contentItem.implicitHeight
         topMargin: 6
         bottomMargin: 6
+        Kirigami.Theme.colorSet: Kirigami.Theme.View
+        Kirigami.Theme.inherit: controlRoot.Kirigami.Theme.inherit
 
         contentItem: ListView {
             id: listview
@@ -93,8 +100,8 @@
                 margins: -1
             }
             radius: 2
-            color: 
StylePrivate.SystemPaletteSingleton.base(controlRoot.enabled)
-            property color borderColor: 
StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
+            color: Kirigami.Theme.backgroundColor
+            property color borderColor: Kirigami.Theme.textColor
             border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 
0.3)
             layer.enabled: true
             
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.10.95/org.kde.desktop/Dial.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/Dial.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/Dial.qml     2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/Dial.qml      2017-10-07 
19:35:04.000000000 +0200
@@ -24,7 +24,7 @@
 import QtQuick.Controls 2.0
 import QtQuick.Controls.impl 2.0
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.Dial {
     id: control
@@ -35,7 +35,7 @@
     background: DialRing {
         width: control.availableWidth
         height: control.availableHeight
-        color: control.visualFocus ? 
StylePrivate.SystemPaletteSingleton.highlight(control.enabled) : 
StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        color: control.visualFocus ? Kirigami.Theme.highlightColor : 
Kirigami.Theme.textColor
         progress: control.position
         opacity: control.enabled ? 0.5 : 0.3
     }
@@ -46,6 +46,6 @@
         width: 18
         height: width
         radius: 8
-        color: control.visualFocus ? 
StylePrivate.SystemPaletteSingleton.highlight(control.enabled) : 
StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        color: control.visualFocus ? Kirigami.Theme.highlightColor : 
Kirigami.Theme.textColor
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/Dialog.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/Dialog.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/Dialog.qml   2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/Dialog.qml    2017-10-07 
19:35:04.000000000 +0200
@@ -23,7 +23,7 @@
 import QtQuick 2.6
 import QtGraphicalEffects 1.0
 import QtQuick.Templates 2.1 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.Dialog {
     id: control
@@ -62,8 +62,8 @@
 
     background: Rectangle {
         radius: 2
-        color: StylePrivate.SystemPaletteSingleton.window(control.enabled)
-        property color borderColor: 
StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        color: Kirigami.Theme.backgroundColor
+        property color borderColor: Kirigami.Theme.textColor
         border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3)
         layer.enabled: true
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/Drawer.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/Drawer.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/Drawer.qml   2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/Drawer.qml    2017-10-07 
19:35:04.000000000 +0200
@@ -23,7 +23,7 @@
 import QtQuick 2.6
 import QtQuick.Controls 2.0
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.Drawer {
     id: control
@@ -42,7 +42,7 @@
     bottomPadding: control.edge === Qt.TopEdge ? 1 : 0
 
     background: Rectangle {
-        color: StylePrivate.SystemPaletteSingleton.window(control.enabled)
+        color: Kirigami.Theme.backgroundColor
         Rectangle {
             readonly property bool horizontal: control.edge === Qt.LeftEdge || 
control.edge === Qt.RightEdge
             anchors {
@@ -51,7 +51,7 @@
                top: control.edge !== Qt.TopEdge ? parent.top : undefined
                bottom: control.edge !== Qt.BottomEdge ? parent.bottom : 
undefined
             }
-            color: StylePrivate.SystemPaletteSingleton.text(control.enabled)
+            color: Kirigami.Theme.textColor
             opacity: 0.3
             width: 1
             height: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.10.95/org.kde.desktop/Frame.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/Frame.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/Frame.qml    2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/Frame.qml     2017-10-07 
19:35:04.000000000 +0200
@@ -23,6 +23,7 @@
 import QtQuick 2.6
 import QtQuick.Controls 2.0
 import QtQuick.Templates 2.0 as T
+import org.kde.kirigami 2.2 as Kirigami
 
 T.Frame {
     id: control
@@ -37,7 +38,7 @@
 
     background: Rectangle {
         color: "transparent"
-        property color borderColor: 
StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        property color borderColor: Kirigami.Theme.textColor
         border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3)
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/GroupBox.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/GroupBox.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/GroupBox.qml 2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/GroupBox.qml  2017-10-07 
19:35:04.000000000 +0200
@@ -23,7 +23,7 @@
 import QtQuick 2.6
 import QtQuick.Controls 2.0
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.GroupBox {
     id: control
@@ -43,7 +43,7 @@
 
         text: control.title
         font: control.font
-        color: StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        color: Kirigami.Theme.textColor
         elide: Text.ElideRight
         horizontalAlignment: Text.AlignLeft
         verticalAlignment: Text.AlignVCenter
@@ -51,7 +51,7 @@
 
     background: Rectangle {
         color: "transparent"
-        property color borderColor: 
StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        property color borderColor: Kirigami.Theme.textColor
         border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3)
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/ItemDelegate.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/ItemDelegate.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/ItemDelegate.qml     
2017-09-06 16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/ItemDelegate.qml      
2017-10-07 19:35:04.000000000 +0200
@@ -21,8 +21,8 @@
 
 
 import QtQuick 2.5
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
 import QtQuick.Templates 2.0 as T
+import org.kde.kirigami 2.2 as Kirigami
 import "private"
 
 T.ItemDelegate {
@@ -43,7 +43,7 @@
 
         text: controlRoot.text
         font: controlRoot.font
-        color: controlRoot.highlighted || controlRoot.checked || 
(controlRoot.pressed && !controlRoot.checked && !controlRoot.sectionDelegate) ? 
StylePrivate.SystemPaletteSingleton.highlightedText(controlRoot.enabled) : 
StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
+        color: controlRoot.highlighted || controlRoot.checked || 
(controlRoot.pressed && !controlRoot.checked && !controlRoot.sectionDelegate) ? 
Kirigami.Theme.highlightedTextColor : (controlRoot.enabled ? 
Kirigami.Theme.textColor : Kirigami.Theme.disabledTextColor)
         elide: Text.ElideRight
         visible: controlRoot.text
         horizontalAlignment: Text.AlignLeft
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.10.95/org.kde.desktop/Label.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/Label.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/Label.qml    2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/Label.qml     2017-10-07 
19:35:04.000000000 +0200
@@ -24,11 +24,11 @@
 import QtQuick.Window 2.2
 import QtQuick.Templates 2.0 as T
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.Label {
     id: control
 
-    height: Math.round(Math.max(paintedHeight, 
StylePrivate.TextSingleton.height * 1.6))
     verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter
 
     activeFocusOnTab: false
@@ -36,10 +36,17 @@
     renderType: Window.devicePixelRatio % 1 !== 0 ? Text.QtRendering : 
Text.NativeRendering
     
 
-    //font data is the system one by default
-    color: StylePrivate.SystemPaletteSingleton.text(control.enabled)
-    //StylePrivate.SystemPaletteSingleton doesn't have a link color
-    linkColor: "#2196F3"
+    font.capitalization: Kirigami.Theme.defaultFont.capitalization
+    font.family: Kirigami.Theme.defaultFont.family
+    font.italic: Kirigami.Theme.defaultFont.italic
+    font.letterSpacing: Kirigami.Theme.defaultFont.letterSpacing
+    font.pointSize: Kirigami.Theme.defaultFont.pointSize
+    font.strikeout: Kirigami.Theme.defaultFont.strikeout
+    font.underline: Kirigami.Theme.defaultFont.underline
+    font.weight: Kirigami.Theme.defaultFont.weight
+    font.wordSpacing: Kirigami.Theme.defaultFont.wordSpacing
+    color: Kirigami.Theme.textColor
+    linkColor: Kirigami.Theme.linkColor
 
     opacity: enabled? 1 : 0.6
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.10.95/org.kde.desktop/Menu.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/Menu.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/Menu.qml     2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/Menu.qml      2017-10-07 
19:35:04.000000000 +0200
@@ -24,7 +24,7 @@
 import QtGraphicalEffects 1.0
 import QtQuick.Controls 2.0
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.Menu {
     id: control
@@ -70,8 +70,8 @@
         radius: 2
         implicitWidth: 150
         implicitHeight: 40
-        color: StylePrivate.SystemPaletteSingleton.window(control.enabled)
-        property color borderColor: 
StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        color: Kirigami.Theme.backgroundColor
+        property color borderColor: Kirigami.Theme.textColor
         border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3)
         layer.enabled: true
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/MenuItem.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/MenuItem.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/MenuItem.qml 2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/MenuItem.qml  2017-10-07 
19:35:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 import QtQuick 2.6
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.MenuItem {
     id: controlRoot
@@ -43,7 +43,7 @@
 
         text: controlRoot.text
         font: controlRoot.font
-        color: controlRoot.hovered && !controlRoot.pressed ? 
StylePrivate.SystemPaletteSingleton.highlightedText(controlRoot.enabled) : 
StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
+        color: controlRoot.hovered && !controlRoot.pressed ? 
Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
         elide: Text.ElideRight
         visible: controlRoot.text
         horizontalAlignment: Text.AlignLeft
@@ -64,7 +64,7 @@
 
         Rectangle {
             anchors.fill: parent
-            color: 
StylePrivate.SystemPaletteSingleton.highlight(controlRoot.enabled)
+            color: Kirigami.Theme.highlightColor
             opacity: controlRoot.hovered && !controlRoot.pressed ? 1 : 0
             Behavior on opacity { NumberAnimation { duration: 150 } }
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.10.95/org.kde.desktop/Popup.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/Popup.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/Popup.qml    2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/Popup.qml     2017-10-07 
19:35:04.000000000 +0200
@@ -23,7 +23,7 @@
 import QtQuick 2.6
 import QtGraphicalEffects 1.0
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.Popup {
     id: control
@@ -62,8 +62,8 @@
 
     background: Rectangle {
         radius: 2
-        color: StylePrivate.SystemPaletteSingleton.window(control.enabled)
-        property color borderColor: 
StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        color: Kirigami.Theme.backgroundColor
+        property color borderColor: Kirigami.Theme.textColor
         border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3)
         layer.enabled: true
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/RadioButton.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/RadioButton.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/RadioButton.qml      
2017-09-06 16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/RadioButton.qml       
2017-10-07 19:35:04.000000000 +0200
@@ -23,7 +23,7 @@
 import QtQuick 2.6
 import QtQuick.Templates 2.0 as T
 import QtQuick.Controls 2.0
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.CheckBox {
     id: control
@@ -36,7 +36,7 @@
     baselineOffset: contentItem.y + contentItem.baselineOffset
 
     padding: 1
-    spacing: Math.round(StylePrivate.TextSingleton.height / 8)
+    spacing: Kirigami.Units.smallSpacing
 
     hoverEnabled: true
 
@@ -56,7 +56,7 @@
         opacity: control.enabled ? 1 : 0.6
         text: control.text
         font: control.font
-        color: StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        color: Kirigami.Theme.textColor
         elide: Text.ElideRight
         visible: control.text
         horizontalAlignment: Text.AlignLeft
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/RadioDelegate.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/RadioDelegate.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/RadioDelegate.qml    
2017-09-06 16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/RadioDelegate.qml     
2017-10-07 19:35:04.000000000 +0200
@@ -21,8 +21,8 @@
 
 
 import QtQuick 2.5
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
 import QtQuick.Templates 2.0 as T
+import org.kde.kirigami 2.2 as Kirigami
 import "private"
 
 T.RadioDelegate {
@@ -43,7 +43,7 @@
 
         text: controlRoot.text
         font: controlRoot.font
-        color: (controlRoot.pressed && !controlRoot.checked && 
!controlRoot.sectionDelegate) ? 
StylePrivate.SystemPaletteSingleton.highlightedText(controlRoot.enabled) : 
StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
+        color: (controlRoot.pressed && !controlRoot.checked && 
!controlRoot.sectionDelegate) ? Kirigami.Theme.highlightedTextColor : 
Kirigami.Theme.textColor
         elide: Text.ElideRight
         visible: controlRoot.text
         horizontalAlignment: Text.AlignLeft
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/RangeSlider.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/RangeSlider.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/RangeSlider.qml      
2017-09-06 16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/RangeSlider.qml       
2017-10-07 19:35:04.000000000 +0200
@@ -23,7 +23,7 @@
 import QtQuick 2.6
 import QtQuick.Controls 2.0
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.RangeSlider {
     id: control
@@ -44,9 +44,9 @@
         implicitWidth: 18
         implicitHeight: 18
         radius: width / 2
-        property color borderColor: 
StylePrivate.SystemPaletteSingleton.text(control.enabled)
-        border.color: control.activeFocus ? 
StylePrivate.SystemPaletteSingleton.highlight(control.enabled) : 
Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3)
-        color: StylePrivate.SystemPaletteSingleton.window(control.enabled)
+        property color borderColor: Kirigami.Theme.textColor
+        border.color: control.activeFocus ? Kirigami.Theme.highlightColor : 
Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3)
+        color: Kirigami.Theme.backgroundColor
         Rectangle {
             z: -1
             x: 1
@@ -65,9 +65,9 @@
         implicitWidth: 18
         implicitHeight: 18
         radius: width / 2
-        property color borderColor: 
StylePrivate.SystemPaletteSingleton.text(control.enabled)
-        border.color: control.activeFocus ? 
StylePrivate.SystemPaletteSingleton.highlight(control.enabled) : 
Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3)
-        color: StylePrivate.SystemPaletteSingleton.window(control.enabled)
+        property color borderColor: Kirigami.Theme.textColor
+        border.color: control.activeFocus ? Kirigami.Theme.highlightColor : 
Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3)
+        color: Kirigami.Theme.backgroundColor
         Rectangle {
             z: -1
             x: 1
@@ -86,7 +86,7 @@
         width: horizontal ? control.availableWidth : implicitWidth
         height: horizontal ? implicitHeight : control.availableHeight
         radius: Math.round(Math.min(width/2, height/2))
-        property color bgColor: 
StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        property color bgColor: Kirigami.Theme.textColor
         color: Qt.rgba(bgColor.r, bgColor.g, bgColor.b, 0.3)
         anchors.centerIn: parent
 
@@ -95,7 +95,7 @@
             y: parent.horizontal ? 0 : control.second.visualPosition * 
parent.height + 6
             width: parent.horizontal ? control.second.position * parent.width 
- control.first.position * parent.width - 6 : 6
             height: parent.horizontal ? 6 : control.second.position * 
parent.height - control.first.position * parent.height - 6
-            color: 
StylePrivate.SystemPaletteSingleton.highlight(control.enabled)
+            color: Kirigami.Theme.highlightColor
         }
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/ScrollView.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/ScrollView.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/ScrollView.qml       
2017-09-06 16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/ScrollView.qml        
2017-10-07 19:35:04.000000000 +0200
@@ -33,9 +33,14 @@
     implicitWidth: Math.max(background ? background.implicitWidth : 0, 
contentWidth + leftPadding + rightPadding)
     implicitHeight: Math.max(background ? background.implicitHeight : 0, 
contentHeight + topPadding + bottomPadding)
 
-    contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? 
contentChildren[0].implicitWidth : -1)
-    contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 
? contentChildren[0].implicitHeight : -1)
+    contentWidth: scrollHelper.flickableItem ? 
scrollHelper.flickableItem.contentWidth : 0
+    contentHeight: scrollHelper.flickableItem ? 
scrollHelper.flickableItem.contentHeight : 0
 
+    onChildrenChanged: {
+        if (control.children[control.children.length - 
1].hasOwnProperty("contentY")) {
+            scrollHelper.flickableItem = 
control.children[control.children.length - 1];
+        }
+    }
     children: [
         MouseArea {
             id: scrollHelper
@@ -46,7 +51,7 @@
                 flickableItem.boundsBehavior = scrollHelper.isMobile ? 
Flickable.DragAndOvershootBounds : Flickable.StopAtBounds;
                 flickableItem.interactive = scrollHelper.isMobile;
             }
-            property Flickable flickableItem: control.children.length > 1 ? 
control.children[1] : null
+            property Flickable flickableItem
             onFlickableItemChanged: {
                 flickableItem.parent = scrollHelper;
                 flickableItem.boundsBehavior = scrollHelper.isMobile ? 
Flickable.DragAndOvershootBounds : Flickable.StopAtBounds;
@@ -85,7 +90,7 @@
         x: control.mirrored ? 0 : control.width - width
         y: control.topPadding
         height: control.availableHeight
-        active: control.ScrollBar.horizontal.active
+        active: control.ScrollBar.horizontal || 
control.ScrollBar.horizontal.active
     }
 
     ScrollBar.horizontal: ScrollBar {
@@ -93,6 +98,6 @@
         x: control.leftPadding
         y: control.height - height
         width: control.availableWidth
-        active: control.ScrollBar.vertical.active
+        active: control.ScrollBar.vertical || control.ScrollBar.vertical.active
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/Slider.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/Slider.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/Slider.qml   2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/Slider.qml    2017-10-07 
19:35:04.000000000 +0200
@@ -23,9 +23,11 @@
 import QtQuick 2.6
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
 import QtQuick.Templates 2.0 as T
+import org.kde.kirigami 2.2 as Kirigami
 
 T.Slider {
     id: controlRoot
+    Kirigami.Theme.colorSet: Kirigami.Theme.Button
 
     implicitWidth: background.implicitWidth
     implicitHeight: background.implicitHeight
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/SpinBox.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/SpinBox.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/SpinBox.qml  2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/SpinBox.qml   2017-10-07 
19:35:04.000000000 +0200
@@ -22,10 +22,13 @@
 
 import QtQuick 2.6
 import QtQuick.Templates 2.0 as T
+import org.kde.kirigami 2.2 as Kirigami
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
 
 T.SpinBox {
     id: controlRoot
+    Kirigami.Theme.colorSet: Kirigami.Theme.View
+    Kirigami.Theme.inherit: false
 
     implicitWidth: Math.max(48, contentItem.implicitWidth + 2 * padding +  
up.indicator.implicitWidth)
     implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
@@ -49,9 +52,9 @@
         opacity: controlRoot.enabled ? 1 : 0.3
 
         font: controlRoot.font
-        color: StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
-        selectionColor: 
StylePrivate.SystemPaletteSingleton.highlight(controlRoot.enabled)
-        selectedTextColor: 
StylePrivate.SystemPaletteSingleton.highlightedText(controlRoot.enabled)
+        color: Kirigami.Theme.textColor
+        selectionColor: Kirigami.Theme.highlightColor
+        selectedTextColor: Kirigami.Theme.highlightedTextColor
         horizontalAlignment: Qt.AlignHCenter
         verticalAlignment: Qt.AlignVCenter
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/Switch.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/Switch.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/Switch.qml   2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/Switch.qml    2017-10-07 
19:35:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 import QtQuick 2.6
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.CheckBox {
     id: control
@@ -33,7 +33,7 @@
     baselineOffset: contentItem.y + contentItem.baselineOffset
 
     padding: 1
-    spacing: Math.round(StylePrivate.TextSingleton.height / 8)
+    spacing: Kirigami.Units.smallSpacing
 
     hoverEnabled: true
 
@@ -54,7 +54,7 @@
         opacity: control.enabled ? 1 : 0.6
         text: control.text
         font: control.font
-        color: StylePrivate.SystemPaletteSingleton.text(control.enabled)
+        color: Kirigami.Theme.textColor
         elide: Text.ElideRight
         visible: control.text
         horizontalAlignment: Text.AlignLeft
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/SwitchDelegate.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/SwitchDelegate.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/SwitchDelegate.qml   
2017-09-06 16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/SwitchDelegate.qml    
2017-10-07 19:35:04.000000000 +0200
@@ -21,7 +21,7 @@
 
 
 import QtQuick 2.5
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 import QtQuick.Templates 2.0 as T
 import "private"
 
@@ -43,7 +43,7 @@
 
         text: controlRoot.text
         font: controlRoot.font
-        color: (controlRoot.pressed && !controlRoot.checked && 
!controlRoot.sectionDelegate) ? 
StylePrivate.SystemPaletteSingleton.highlightedText(controlRoot.enabled) : 
StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
+        color: (controlRoot.pressed && !controlRoot.checked && 
!controlRoot.sectionDelegate) ? Kirigami.Theme.highlightedTextColor : 
Kirigami.Theme.textColor
         elide: Text.ElideRight
         visible: controlRoot.text
         horizontalAlignment: Text.AlignLeft
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/TabBar.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/TabBar.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/TabBar.qml   2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/TabBar.qml    2017-10-07 
19:35:04.000000000 +0200
@@ -22,11 +22,15 @@
 
 import QtQuick 2.6
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 import QtQuick.Templates 2.0 as T
 
 T.TabBar {
     id: controlRoot
 
+    Kirigami.Theme.colorSet: Kirigami.Theme.Button
+    Kirigami.Theme.inherit: false
+
     implicitWidth: contentItem.implicitWidth
     implicitHeight: contentItem.implicitHeight
 
@@ -70,7 +74,7 @@
                 top : controlRoot.position == T.TabBar.Header ? undefined : 
parent.top
             }
             height: 1
-            color: 
StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
+            color: Kirigami.Theme.textColor
             opacity: 0.4
         }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/TextArea.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/TextArea.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/TextArea.qml 2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/TextArea.qml  2017-10-07 
19:35:04.000000000 +0200
@@ -21,11 +21,15 @@
 
 
 import QtQuick 2.6
+import QtQuick.Window 2.1
 import QtQuick.Templates 2.0 as T
+import org.kde.kirigami 2.2 as Kirigami
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
 
 T.TextArea {
     id: controlRoot
+    Kirigami.Theme.colorSet: Kirigami.Theme.View
+    Kirigami.Theme.inherit: false
 
     implicitWidth: Math.max(contentWidth + leftPadding + rightPadding,
                             background ? background.implicitWidth : 0,
@@ -36,9 +40,9 @@
 
     padding: 6
 
-    color: StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
-    selectionColor: 
StylePrivate.SystemPaletteSingleton.highlight(controlRoot.enabled)
-    selectedTextColor: 
StylePrivate.SystemPaletteSingleton.highlightedText(controlRoot.enabled)
+    color: Kirigami.Theme.textColor
+    selectionColor: Kirigami.Theme.highlightColor
+    selectedTextColor: Kirigami.Theme.highlightedTextColor
     wrapMode: Text.WordWrap
     verticalAlignment: TextEdit.AlignTop
     //Text.NativeRendering is broken on non integer pixel ratios
@@ -54,7 +58,7 @@
 
         text: controlRoot.placeholderText
         font: controlRoot.font
-        color: StylePrivate.SystemPaletteSingleton.text(false)
+        color: Kirigami.Theme.disabledTextColor
         horizontalAlignment: controlRoot.horizontalAlignment
         verticalAlignment: controlRoot.verticalAlignment
         visible: !controlRoot.length && !controlRoot.preeditText && 
(!controlRoot.activeFocus || controlRoot.horizontalAlignment !== 
Qt.AlignHCenter)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/TextField.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/TextField.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/TextField.qml        
2017-09-06 16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/TextField.qml 2017-10-07 
19:35:04.000000000 +0200
@@ -21,12 +21,16 @@
 
 
 import QtQuick 2.6
+import QtQuick.Window 2.1
 import QtQuick.Controls 2.0 as Controls
 import QtQuick.Templates 2.0 as T
+import org.kde.kirigami 2.2 as Kirigami
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
 
 T.TextField {
     id: controlRoot
+    Kirigami.Theme.colorSet: Kirigami.Theme.View
+    Kirigami.Theme.inherit: false
 
     implicitWidth: Math.max(200,
                             placeholderText ? placeholder.implicitWidth + 
leftPadding + rightPadding : 0)
@@ -37,9 +41,9 @@
 
     padding: 6
 
-    color: StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
-    selectionColor: 
StylePrivate.SystemPaletteSingleton.highlight(controlRoot.enabled)
-    selectedTextColor: 
StylePrivate.SystemPaletteSingleton.highlightedText(controlRoot.enabled)
+    color: controlRoot.enabled ? Kirigami.Theme.textColor : 
Kirigami.Theme.disabledTextColor
+    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
@@ -54,7 +58,7 @@
 
         text: controlRoot.placeholderText
         font: controlRoot.font
-        color: StylePrivate.SystemPaletteSingleton.text(false)
+        color: Kirigami.Theme.disabledTextColor
         horizontalAlignment: controlRoot.horizontalAlignment
         verticalAlignment: controlRoot.verticalAlignment
         visible: !controlRoot.length && !controlRoot.preeditText && 
(!controlRoot.activeFocus || controlRoot.horizontalAlignment !== 
Qt.AlignHCenter)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/ToolBar.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/ToolBar.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/ToolBar.qml  2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/ToolBar.qml   2017-10-07 
19:35:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 import QtQuick 2.6
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.ToolBar {
     id: controlRoot
@@ -37,17 +37,14 @@
 
     background: Rectangle {
         implicitHeight: 40
-        color: StylePrivate.SystemPaletteSingleton.window(controlRoot.enabled)
-        Rectangle {
+        color: Kirigami.Theme.backgroundColor
+        Kirigami.Separator {
             anchors {
                 left: parent.left
                 right: parent.right
                 top: controlRoot.parent.footer && controlRoot.parent.footer == 
controlRoot ? parent.top : undefined
-                bottom: controlRoot.parent.footer && controlRoot.parent.footer 
== controlRoot ? undefined : parent.top
+                bottom: controlRoot.parent.footer && controlRoot.parent.footer 
== controlRoot ? undefined : parent.bottom
             }
-            height: 1
-            color: 
StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
-            opacity: 0.3
         }
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/ToolButton.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/ToolButton.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/ToolButton.qml       
2017-09-06 16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/ToolButton.qml        
2017-10-07 19:35:04.000000000 +0200
@@ -22,10 +22,13 @@
 
 import QtQuick 2.6
 import QtQuick.Templates 2.0 as T
+import org.kde.kirigami 2.2 as Kirigami
 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
 
 T.ToolButton {
     id: controlRoot
+    Kirigami.Theme.colorSet: flat ? Kirigami.Theme.Window : 
Kirigami.Theme.Button
+    Kirigami.Theme.inherit: flat
 
     implicitWidth: background.implicitWidth
     implicitHeight: background.implicitHeight
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/ToolTip.qml 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/ToolTip.qml
--- old/qqc2-desktop-style-5.10.95/org.kde.desktop/ToolTip.qml  2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/org.kde.desktop/ToolTip.qml   2017-10-07 
19:35:04.000000000 +0200
@@ -24,11 +24,14 @@
 import QtGraphicalEffects 1.0
 import QtQuick.Controls 2.0 as Controls
 import QtQuick.Templates 2.0 as T
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 T.ToolTip {
     id: controlRoot
 
+    Kirigami.Theme.colorSet: Kirigami.Theme.Tooltip
+    Kirigami.Theme.inherit: false
+
     x: parent ? (parent.width - implicitWidth) / 2 : 0
     y: -implicitHeight - 3
 
@@ -43,14 +46,16 @@
     contentItem: Controls.Label {
         text: controlRoot.text
         font: controlRoot.font
-        color: 
StylePrivate.StylePrivate.SystemPaletteSingleton.base(controlRoot.enabled)
+        Kirigami.Theme.colorSet: Kirigami.Theme.Tooltip
+        color: Kirigami.Theme.textColor
     }
 
 
     background: Rectangle {
         radius: 3
         opacity: 0.95
-        color: 
StylePrivate.StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled)
+        color: Kirigami.Theme.backgroundColor
+        Kirigami.Theme.colorSet: Kirigami.Theme.Tooltip
         layer.enabled: true
         layer.effect: DropShadow {
             transparentBorder: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/private/DefaultListItemBackground.qml
 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/private/DefaultListItemBackground.qml
--- 
old/qqc2-desktop-style-5.10.95/org.kde.desktop/private/DefaultListItemBackground.qml
        2017-09-06 16:36:02.000000000 +0200
+++ 
new/qqc2-desktop-style-5.39.0/org.kde.desktop/private/DefaultListItemBackground.qml
 2017-10-07 19:35:04.000000000 +0200
@@ -21,16 +21,16 @@
 
 
 import QtQuick 2.1
-import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
+import org.kde.kirigami 2.2 as Kirigami
 
 Rectangle {
     id: background
-    color: highlighted || (controlRoot.pressed && !controlRoot.checked && 
!controlRoot.sectionDelegate) ? 
StylePrivate.SystemPaletteSingleton.highlight(controlRoot.enabled) : 
StylePrivate.SystemPaletteSingleton.base(controlRoot.enabled)
+    color: highlighted || (controlRoot.pressed && !controlRoot.checked && 
!controlRoot.sectionDelegate) ? Kirigami.Theme.highlightColor : 
Kirigami.Theme.backgroundColor
 
     visible: controlRoot.ListView.view ? controlRoot.ListView.view.highlight 
=== null : true
     Rectangle {
         anchors.fill: parent
-        color: 
StylePrivate.SystemPaletteSingleton.highlight(controlRoot.enabled)
+        color: Kirigami.Theme.highlightColor
         opacity: controlRoot.hovered && !controlRoot.pressed ? 0.2 : 0
         Behavior on opacity { NumberAnimation { duration: 150 } }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.10.95/plugin/CMakeLists.txt 
new/qqc2-desktop-style-5.39.0/plugin/CMakeLists.txt
--- old/qqc2-desktop-style-5.10.95/plugin/CMakeLists.txt        2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/plugin/CMakeLists.txt 2017-10-07 
19:35:04.000000000 +0200
@@ -15,9 +15,7 @@
 endif()
 
 add_library(qqc2desktopstyleplugin SHARED ${qqc2desktopstyle_SRCS})
-target_link_libraries(qqc2desktopstyleplugin Qt5::Core  Qt5::Qml Qt5::Quick 
Qt5::Gui Qt5::Widgets)
+target_link_libraries(qqc2desktopstyleplugin Qt5::Core  Qt5::Qml Qt5::Quick 
Qt5::Gui Qt5::Widgets KF5::Kirigami2)
 
 install(TARGETS qqc2desktopstyleplugin DESTINATION 
${KDE_INSTALL_QMLDIR}/org/kde/qqc2desktopstyle/private)
-install(FILES SystemPaletteSingleton.qml DESTINATION 
${KDE_INSTALL_QMLDIR}/org/kde/qqc2desktopstyle/private)
-install(FILES TextSingleton.qml DESTINATION 
${KDE_INSTALL_QMLDIR}/org/kde/qqc2desktopstyle/private)
 install(FILES qmldir DESTINATION 
${KDE_INSTALL_QMLDIR}/org/kde/qqc2desktopstyle/private)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/plugin/SystemPaletteSingleton.qml 
new/qqc2-desktop-style-5.39.0/plugin/SystemPaletteSingleton.qml
--- old/qqc2-desktop-style-5.10.95/plugin/SystemPaletteSingleton.qml    
2017-09-06 16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/plugin/SystemPaletteSingleton.qml     
1970-01-01 01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-/*
- * Copyright 2017 Marco Martin <[email protected]>
- * Copyright 2017 The Qt Company Ltd.
- *
- * GNU Lesser General Public License Usage
- * Alternatively, this file may be used under the terms of the GNU Lesser
- * General Public License version 3 as published by the Free Software
- * Foundation and appearing in the file LICENSE.LGPLv3 included in the
- * packaging of this file. Please review the following information to
- * ensure the GNU Lesser General Public License version 3 requirements
- * will be met: https://www.gnu.org/licenses/lgpl.html.
- *
- * GNU General Public License Usage
- * Alternatively, this file may be used under the terms of the GNU
- * General Public License version 2.0 or later as published by the Free
- * Software Foundation and appearing in the file LICENSE.GPL included in
- * the packaging of this file. Please review the following information to
- * ensure the GNU General Public License version 2.0 requirements will be
- * met: http://www.gnu.org/licenses/gpl-2.0.html.
- */
-
-pragma Singleton
-import QtQuick 2.2
-
-QtObject {
-    property SystemPalette active: SystemPalette { colorGroup: 
SystemPalette.Active }
-    property SystemPalette disabled: SystemPalette { colorGroup: 
SystemPalette.Disabled }
-
-    function alternateBase(enabled) { return enabled ? active.alternateBase : 
disabled.alternateBase }
-    function base(enabled) { return enabled ? active.base : disabled.base }
-    function button(enabled) { return enabled ? active.button : 
disabled.button }
-    function buttonText(enabled) { return enabled ? active.buttonText : 
disabled.buttonText }
-    function dark(enabled) { return enabled ? active.dark : disabled.dark }
-    function highlight(enabled) { return enabled ? active.highlight : 
disabled.highlight }
-    function highlightedText(enabled) { return enabled ? 
active.highlightedText : disabled.highlightedText }
-    function light(enabled) { return enabled ? active.light : disabled.light }
-    function mid(enabled) { return enabled ? active.mid : disabled.mid }
-    function midlight(enabled) { return enabled ? active.midlight : 
disabled.midlight }
-    function shadow(enabled) { return enabled ? active.shadow : 
disabled.shadow }
-    function text(enabled) { return enabled ? active.text : disabled.text }
-    function window(enabled) { return enabled ? active.window : 
disabled.window }
-    function windowText(enabled) { return enabled ? active.windowText : 
disabled.windowText }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.10.95/plugin/TextSingleton.qml 
new/qqc2-desktop-style-5.39.0/plugin/TextSingleton.qml
--- old/qqc2-desktop-style-5.10.95/plugin/TextSingleton.qml     2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/plugin/TextSingleton.qml      1970-01-01 
01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-/*
- * Copyright 2017 Marco Martin <[email protected]>
- * Copyright 2017 The Qt Company Ltd.
- *
- * GNU Lesser General Public License Usage
- * Alternatively, this file may be used under the terms of the GNU Lesser
- * General Public License version 3 as published by the Free Software
- * Foundation and appearing in the file LICENSE.LGPLv3 included in the
- * packaging of this file. Please review the following information to
- * ensure the GNU Lesser General Public License version 3 requirements
- * will be met: https://www.gnu.org/licenses/lgpl.html.
- *
- * GNU General Public License Usage
- * Alternatively, this file may be used under the terms of the GNU
- * General Public License version 2.0 or later as published by the Free
- * Software Foundation and appearing in the file LICENSE.GPL included in
- * the packaging of this file. Please review the following information to
- * ensure the GNU General Public License version 2.0 requirements will be
- * met: http://www.gnu.org/licenses/gpl-2.0.html.
- */
-
-pragma Singleton
-import QtQuick 2.2
-Text {
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/plugin/kquickstyleitem.cpp 
new/qqc2-desktop-style-5.39.0/plugin/kquickstyleitem.cpp
--- old/qqc2-desktop-style-5.10.95/plugin/kquickstyleitem.cpp   2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/plugin/kquickstyleitem.cpp    2017-10-07 
19:35:04.000000000 +0200
@@ -54,6 +54,7 @@
 #include "qsgdefaultninepatchnode_p.h"
 #endif
 
+#include <Kirigami2/PlatformTheme>
 
 KQuickStyleItem::KQuickStyleItem(QQuickItem *parent)
     : QQuickItem(parent),
@@ -160,6 +161,18 @@
 
 void KQuickStyleItem::initStyleOption()
 {
+    if (!m_theme) {
+        m_theme = static_cast<Kirigami::PlatformTheme 
*>(qmlAttachedPropertiesObject<Kirigami::PlatformTheme>(this, true));
+        Q_ASSERT(m_theme);
+
+        connect(m_theme, &Kirigami::PlatformTheme::colorsChanged, this, 
[this]() {
+            //we need to reset the palette event if Qt::AA_SetPalette 
attribute has been set
+            m_styleoption->palette = m_theme->palette();
+            updateItem();
+        });
+    }
+    Q_ASSERT(m_theme);
+
     if (m_styleoption)
         m_styleoption->state = 0;
 
@@ -694,7 +707,7 @@
     if (QCoreApplication::testAttribute(Qt::AA_SetPalette))
         return;
 
-    m_styleoption->palette = QApplication::palette(classNameForItem());
+    m_styleoption->palette = m_theme->palette();
 }
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.10.95/plugin/kquickstyleitem_p.h 
new/qqc2-desktop-style-5.39.0/plugin/kquickstyleitem_p.h
--- old/qqc2-desktop-style-5.10.95/plugin/kquickstyleitem_p.h   2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/plugin/kquickstyleitem_p.h    2017-10-07 
19:35:04.000000000 +0200
@@ -51,6 +51,10 @@
 class QWidget;
 class QStyleOption;
 
+namespace Kirigami {
+    class PlatformTheme;
+}
+
 class QQuickTableRowImageProvider1 : public QQuickImageProvider
 {
 public:
@@ -270,6 +274,7 @@
     qreal baselineOffset();
 
 protected:
+    Kirigami::PlatformTheme *m_theme = nullptr;
     QStyleOption *m_styleoption;
     QPointer<QQuickItem> m_control;
     Type m_itemType;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.10.95/plugin/qmldir 
new/qqc2-desktop-style-5.39.0/plugin/qmldir
--- old/qqc2-desktop-style-5.10.95/plugin/qmldir        2017-09-06 
16:36:02.000000000 +0200
+++ new/qqc2-desktop-style-5.39.0/plugin/qmldir 2017-10-07 19:35:04.000000000 
+0200
@@ -1,5 +1,3 @@
 module org.kde.qqc2desktopstyle.private
 plugin qqc2desktopstyleplugin
 
-singleton SystemPaletteSingleton 1.0 SystemPaletteSingleton.qml
-singleton TextSingleton 1.0 TextSingleton.qml


Reply via email to