Hello community,
here is the log from the commit of package qqc2-desktop-style for
openSUSE:Factory checked in at 2018-02-18 11:42:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qqc2-desktop-style (Old)
and /work/SRC/openSUSE:Factory/.qqc2-desktop-style.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qqc2-desktop-style"
Sun Feb 18 11:42:19 2018 rev:6 rq:576574 version:5.43.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/qqc2-desktop-style/qqc2-desktop-style.changes
2018-01-22 16:05:01.715800457 +0100
+++
/work/SRC/openSUSE:Factory/.qqc2-desktop-style.new/qqc2-desktop-style.changes
2018-02-18 11:42:19.605681726 +0100
@@ -1,0 +2,14 @@
+Mon Feb 12 23:42:13 CET 2018 - [email protected]
+
+- Update to 5.43.0
+ * New feature release
+ * For more details please see:
+ * https://www.kde.org/announcements/kde-frameworks-5.43.0.php
+- Changes since 5.42.0:
+ * use the inactive or disabled color group when needed
+ * Apply some C++11 niceties, styling consistency
+ * Add BusyIndicator to the styled controls list
+ * remove flicker when hovering scrollbar
+ * Cache KColorScheme instances
+
+-------------------------------------------------------------------
Old:
----
qqc2-desktop-style-5.42.0.tar.xz
New:
----
qqc2-desktop-style-5.43.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qqc2-desktop-style.spec ++++++
--- /var/tmp/diff_new_pack.VXY8OE/_old 2018-02-18 11:42:20.661643820 +0100
+++ /var/tmp/diff_new_pack.VXY8OE/_new 2018-02-18 11:42:20.665643677 +0100
@@ -16,9 +16,9 @@
#
-%define _tar_path 5.42
+%define _tar_path 5.43
Name: qqc2-desktop-style
-Version: 5.42.0
+Version: 5.43.0
Release: 0
Summary: A Qt Quick Controls 2 Style for Desktop UIs
License: GPL-2.0+
++++++ qqc2-desktop-style-5.42.0.tar.xz -> qqc2-desktop-style-5.43.0.tar.xz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qqc2-desktop-style-5.42.0/CMakeLists.txt
new/qqc2-desktop-style-5.43.0/CMakeLists.txt
--- old/qqc2-desktop-style-5.42.0/CMakeLists.txt 2018-01-06
00:42:43.000000000 +0100
+++ new/qqc2-desktop-style-5.43.0/CMakeLists.txt 2018-02-05
09:12:29.000000000 +0100
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0)
-set(KF5_VERSION "5.42.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.42.0") # handled by release scripts
+set(KF5_VERSION "5.43.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.43.0") # handled by release scripts
project(qqc2-desktop-style VERSION ${KF5_VERSION})
@@ -21,7 +21,7 @@
################# set KDE specific information #################
-find_package(ECM 5.42.0 REQUIRED NO_MODULE)
+find_package(ECM 5.43.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.42.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.cpp
new/qqc2-desktop-style-5.43.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.cpp
---
old/qqc2-desktop-style-5.42.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.cpp
2018-01-06 00:42:43.000000000 +0100
+++
new/qqc2-desktop-style-5.43.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.cpp
2018-02-05 09:12:29.000000000 +0100
@@ -25,9 +25,7 @@
{
}
-KirigamiPlasmaFactory::~KirigamiPlasmaFactory()
-{
-}
+KirigamiPlasmaFactory::~KirigamiPlasmaFactory() = default;
Kirigami::PlatformTheme *KirigamiPlasmaFactory::createPlatformTheme(QObject
*parent)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qqc2-desktop-style-5.42.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.h
new/qqc2-desktop-style-5.43.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.h
---
old/qqc2-desktop-style-5.42.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.h
2018-01-06 00:42:43.000000000 +0100
+++
new/qqc2-desktop-style-5.43.0/kirigami-plasmadesktop-integration/kirigamiplasmafactory.h
2018-02-05 09:12:29.000000000 +0100
@@ -33,7 +33,7 @@
public:
explicit KirigamiPlasmaFactory(QObject *parent = nullptr);
- ~KirigamiPlasmaFactory();
+ ~KirigamiPlasmaFactory() override;
Kirigami::PlatformTheme *createPlatformTheme(QObject *parent)
Q_DECL_OVERRIDE;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qqc2-desktop-style-5.42.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
new/qqc2-desktop-style-5.43.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
---
old/qqc2-desktop-style-5.42.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
2018-01-06 00:42:43.000000000 +0100
+++
new/qqc2-desktop-style-5.43.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
2018-02-05 09:12:29.000000000 +0100
@@ -32,14 +32,115 @@
class IconLoaderSingleton
{
public:
- IconLoaderSingleton()
- {}
+ IconLoaderSingleton() = default;
KIconLoader self;
};
Q_GLOBAL_STATIC(IconLoaderSingleton, privateIconLoaderSelf)
+class StyleSingleton : public QObject
+{
+ Q_OBJECT
+
+public:
+ struct Colors {
+ QPalette palette;
+ KColorScheme selectionScheme;
+ KColorScheme scheme;
+ };
+
+ explicit StyleSingleton()
+ : QObject()
+ , buttonScheme(QPalette::Active, KColorScheme::ColorSet::Button)
+ , viewScheme(QPalette::Active, KColorScheme::ColorSet::View)
+ {
+ connect(qGuiApp, &QGuiApplication::paletteChanged,
+ this, &StyleSingleton::refresh);
+ }
+
+ void refresh()
+ {
+ m_cache.clear();
+ buttonScheme = KColorScheme(QPalette::Active,
KColorScheme::ColorSet::Button);
+ viewScheme = KColorScheme(QPalette::Active,
KColorScheme::ColorSet::View);
+
+ Q_EMIT paletteChanged();
+ }
+
+ Colors loadColors(Kirigami::PlatformTheme::ColorSet cs,
QPalette::ColorGroup group)
+ {
+ const auto key = qMakePair(cs, group);
+ auto it = m_cache.constFind(key);
+ if (it != m_cache.constEnd())
+ return *it;
+
+ using Kirigami::PlatformTheme;
+
+ KColorScheme::ColorSet set;
+
+ switch (cs) {
+ 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;
+ }
+
+ Colors ret = {{}, KColorScheme(group,
KColorScheme::ColorSet::Selection), KColorScheme(group, set)};
+
+ QPalette pal;
+ for (auto state : { QPalette::Active, QPalette::Inactive,
QPalette::Disabled }) {
+ pal.setBrush(state, QPalette::WindowText, ret.scheme.foreground());
+ pal.setBrush(state, QPalette::Window, ret.scheme.background());
+ pal.setBrush(state, QPalette::Base, ret.scheme.background());
+ pal.setBrush(state, QPalette::Text, ret.scheme.foreground());
+ pal.setBrush(state, QPalette::Button, ret.scheme.background());
+ pal.setBrush(state, QPalette::ButtonText, ret.scheme.foreground());
+ pal.setBrush(state, QPalette::Highlight,
ret.selectionScheme.background());
+ pal.setBrush(state, QPalette::HighlightedText,
ret.selectionScheme.foreground());
+ pal.setBrush(state, QPalette::ToolTipBase,
ret.scheme.background());
+ pal.setBrush(state, QPalette::ToolTipText,
ret.scheme.foreground());
+
+ pal.setColor(state, QPalette::Light,
ret.scheme.shade(KColorScheme::LightShade));
+ pal.setColor(state, QPalette::Midlight,
ret.scheme.shade(KColorScheme::MidlightShade));
+ pal.setColor(state, QPalette::Mid,
ret.scheme.shade(KColorScheme::MidShade));
+ pal.setColor(state, QPalette::Dark,
ret.scheme.shade(KColorScheme::DarkShade));
+ pal.setColor(state, QPalette::Shadow,
ret.scheme.shade(KColorScheme::ShadowShade));
+
+ pal.setBrush(state, QPalette::AlternateBase,
ret.scheme.background(KColorScheme::AlternateBackground));
+ pal.setBrush(state, QPalette::Link,
ret.scheme.foreground(KColorScheme::LinkText));
+ pal.setBrush(state, QPalette::LinkVisited,
ret.scheme.foreground(KColorScheme::VisitedText));
+ }
+ ret.palette = pal;
+ m_cache.insert(key, ret);
+ return ret;
+ }
+
+ KColorScheme buttonScheme;
+ KColorScheme viewScheme;
+
+Q_SIGNALS:
+ void paletteChanged();
+
+private:
+ QHash<QPair<Kirigami::PlatformTheme::ColorSet, QPalette::ColorGroup>,
Colors> m_cache;
+};
+Q_GLOBAL_STATIC_WITH_ARGS(QScopedPointer<StyleSingleton>, s_style, (new
StyleSingleton));
+
PlasmaDesktopTheme::PlasmaDesktopTheme(QObject *parent)
: PlatformTheme(parent)
{
@@ -69,27 +170,26 @@
}
//TODO: correct? depends from https://codereview.qt-project.org/206889
- connect(qApp, &QGuiApplication::fontDatabaseChanged, this, [this]()
{setDefaultFont(qApp->font());});
+ connect(qGuiApp, &QGuiApplication::fontDatabaseChanged, this, [this]()
{setDefaultFont(qApp->font());});
connect(this, &PlasmaDesktopTheme::colorSetChanged,
this, &PlasmaDesktopTheme::syncColors);
- connect(qApp, &QGuiApplication::paletteChanged,
+ connect(this, &PlasmaDesktopTheme::colorGroupChanged,
+ this, &PlasmaDesktopTheme::syncColors);
+
+ connect(s_style->data(), &StyleSingleton::paletteChanged,
this, &PlasmaDesktopTheme::syncColors);
syncColors();
}
-PlasmaDesktopTheme::~PlasmaDesktopTheme()
-{
-}
+PlasmaDesktopTheme::~PlasmaDesktopTheme() = default;
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];
+ for (auto state : { QPalette::Active, QPalette::Inactive,
QPalette::Disabled }) {
pal.setBrush(state, QPalette::WindowText, customColor);
}
}
@@ -101,30 +201,7 @@
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;
+ QPalette::ColorGroup group = (QPalette::ColorGroup)colorGroup();
if (m_parentItem) {
if (!m_parentItem->isEnabled()) {
group = QPalette::Disabled;
@@ -137,94 +214,64 @@
}
}
- const KColorScheme selectionScheme(group,
KColorScheme::ColorSet::Selection);
- const KColorScheme scheme(group, set);
+ const auto colors = (*s_style)->loadColors(colorSet(), group);
+ setPalette(colors.palette);
//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());
-
+ setTextColor(colors.scheme.foreground(KColorScheme::NormalText).color());
+
setDisabledTextColor(colors.scheme.foreground(KColorScheme::InactiveText).color());
+
setHighlightedTextColor(colors.selectionScheme.foreground(KColorScheme::NormalText).color());
+
setActiveTextColor(colors.scheme.foreground(KColorScheme::ActiveText).color());
+ setLinkColor(colors.scheme.foreground(KColorScheme::LinkText).color());
+
setVisitedLinkColor(colors.scheme.foreground(KColorScheme::VisitedText).color());
+
setNegativeTextColor(colors.scheme.foreground(KColorScheme::NegativeText).color());
+
setNeutralTextColor(colors.scheme.foreground(KColorScheme::NeutralText).color());
+
setPositiveTextColor(colors.scheme.foreground(KColorScheme::PositiveText).color());
+
//background
-
setBackgroundColor(scheme.background(KColorScheme::NormalBackground).color());
-
setHighlightColor(selectionScheme.background(KColorScheme::NormalBackground).color());
+
setBackgroundColor(colors.scheme.background(KColorScheme::NormalBackground).color());
+
setHighlightColor(colors.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);
-
+ setHoverColor(colors.scheme.decoration(KColorScheme::HoverColor).color());
+ setFocusColor(colors.scheme.decoration(KColorScheme::FocusColor).color());
//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();
+ m_buttonTextColor =
(*s_style)->buttonScheme.foreground(KColorScheme::NormalText).color();
+ m_buttonBackgroundColor =
(*s_style)->buttonScheme.background(KColorScheme::NormalBackground).color();
+ m_buttonHoverColor =
(*s_style)->buttonScheme.decoration(KColorScheme::HoverColor).color();
+ m_buttonFocusColor =
(*s_style)->buttonScheme.decoration(KColorScheme::FocusColor).color();
+
+ m_viewTextColor =
(*s_style)->viewScheme.foreground(KColorScheme::NormalText).color();
+ m_viewBackgroundColor =
(*s_style)->viewScheme.background(KColorScheme::NormalBackground).color();
+ m_viewHoverColor =
(*s_style)->viewScheme.decoration(KColorScheme::HoverColor).color();
+ m_viewFocusColor =
(*s_style)->viewScheme.decoration(KColorScheme::FocusColor).color();
emit colorsChanged();
}
QColor PlasmaDesktopTheme::buttonTextColor() const
{
- qWarning()<<"WARNING: buttonTextColor is deprecated, use textColor with
colorSet: Theme.Button instead";
+ 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";
+ 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";
+ 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";
+ qWarning() << "WARNING: buttonFocusColor is deprecated, use
backgroundColor with colorSet: Theme.Button instead";
return m_buttonFocusColor;
}
@@ -237,20 +284,20 @@
QColor PlasmaDesktopTheme::viewBackgroundColor() const
{
- qWarning()<<"WARNING: viewBackgroundColor is deprecated, use
backgroundColor with colorSet: Theme.View instead";
+ 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";
+ 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";
+ qWarning() << "WARNING: viewFocusColor is deprecated, use backgroundColor
with colorSet: Theme.View instead";
return m_viewFocusColor;
}
-#include "moc_plasmadesktoptheme.cpp"
+#include "plasmadesktoptheme.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qqc2-desktop-style-5.42.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.h
new/qqc2-desktop-style-5.43.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.h
---
old/qqc2-desktop-style-5.42.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.h
2018-01-06 00:42:43.000000000 +0100
+++
new/qqc2-desktop-style-5.43.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.h
2018-02-05 09:12:29.000000000 +0100
@@ -25,6 +25,7 @@
#include <QQuickItem>
#include <QColor>
#include <QPointer>
+#include <QIcon>
class PlasmaDesktopTheme;
class KIconLoader;
@@ -45,8 +46,8 @@
Q_PROPERTY(QColor viewFocusColor READ viewFocusColor NOTIFY colorsChanged)
public:
- explicit PlasmaDesktopTheme(QObject *parent = 0);
- ~PlasmaDesktopTheme();
+ explicit PlasmaDesktopTheme(QObject *parent = nullptr);
+ ~PlasmaDesktopTheme() override;
Q_INVOKABLE QIcon iconFromTheme(const QString &name, const QColor
&customColor = Qt::transparent) Q_DECL_OVERRIDE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qqc2-desktop-style-5.42.0/org.kde.desktop/BusyIndicator.qml
new/qqc2-desktop-style-5.43.0/org.kde.desktop/BusyIndicator.qml
--- old/qqc2-desktop-style-5.42.0/org.kde.desktop/BusyIndicator.qml
1970-01-01 01:00:00.000000000 +0100
+++ new/qqc2-desktop-style-5.43.0/org.kde.desktop/BusyIndicator.qml
2018-02-05 09:12:29.000000000 +0100
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2018 Oleg Chernovskiy <[email protected]>
+ * Copyright 2018 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.
+ */
+
+
+import QtQuick 2.6
+import org.kde.kirigami 2.2 as Kirigami
+import QtQuick.Templates @QQC2_VERSION@ as T
+
+T.BusyIndicator {
+ id: controlRoot
+
+ implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
+ implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
+
+ padding: 6
+ spacing: Kirigami.Units.smallSpacing
+
+ hoverEnabled: true
+
+ contentItem: Kirigami.Icon {
+ source: "view-refresh"
+ opacity: controlRoot.running ? 1 : 0
+
+ // appearing/fading opacity change
+ Behavior on opacity {
+ OpacityAnimator { duration: 250 }
+ }
+
+ // rotating loading icon
+ RotationAnimator {
+ target: controlRoot
+ running: controlRoot.visible && controlRoot.running
+ from: 360
+ to: 0
+ loops: Animation.Infinite
+ duration: 1000
+ }
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qqc2-desktop-style-5.42.0/org.kde.desktop/ScrollBar.qml
new/qqc2-desktop-style-5.43.0/org.kde.desktop/ScrollBar.qml
--- old/qqc2-desktop-style-5.42.0/org.kde.desktop/ScrollBar.qml 2018-01-06
00:42:43.000000000 +0100
+++ new/qqc2-desktop-style-5.43.0/org.kde.desktop/ScrollBar.qml 2018-02-05
09:12:29.000000000 +0100
@@ -23,6 +23,7 @@
import QtQuick 2.6
import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate
import QtQuick.Templates @QQC2_VERSION@ as T
+import org.kde.kirigami 2.2 as Kirigami
T.ScrollBar {
id: controlRoot
@@ -39,6 +40,7 @@
anchors.fill: parent
visible: controlRoot.size < 1.0
hoverEnabled: true
+ state: "inactive"
onPositionChanged: style.activeControl = style.hitTest(mouse.x,
mouse.y)
onExited: style.activeControl = "groove";
onPressed: {
@@ -78,12 +80,7 @@
enabled: controlRoot.enabled
visible: controlRoot.size < 1.0
- opacity: mouseArea.containsMouse ? 1 : 0
- Behavior on opacity {
- OpacityAnimator {
- duration: 250
- }
- }
+ opacity: 1
Timer {
id: buttonTimer
@@ -96,6 +93,7 @@
}
}
StylePrivate.StyleItem {
+ id: inactiveStyle
anchors.fill: parent
control: controlRoot
elementType: "scrollbar"
@@ -108,13 +106,52 @@
enabled: controlRoot.enabled
visible: controlRoot.size < 1.0
- opacity: !mouseArea.containsMouse ? 1 : 0
- Behavior on opacity {
- OpacityAnimator {
- duration: 250
+ opacity: 1
+ }
+ states: [
+ State {
+ name: "hover"
+ when: mouseArea.containsMouse
+ PropertyChanges {
+ target: style
+ opacity: 1
+ }
+ PropertyChanges {
+ target: inactiveStyle
+ opacity: 0
+ }
+ },
+ State {
+ name: "inactive"
+ when: !mouseArea.containsMouse
+ PropertyChanges {
+ target: style
+ opacity: 0
+ }
+ PropertyChanges {
+ target: inactiveStyle
+ opacity: 1
}
}
- }
+ ]
+ transitions: [
+ Transition {
+ ParallelAnimation {
+ NumberAnimation {
+ target: style
+ property: "opacity"
+ duration: Kirigami.Units.shortDuration
+ easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ target: inactiveStyle
+ property: "opacity"
+ duration: Kirigami.Units.shortDuration
+ easing.type: Easing.InOutQuad
+ }
+ }
+ }
+ ]
}
contentItem: Item {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qqc2-desktop-style-5.42.0/plugin/CMakeLists.txt
new/qqc2-desktop-style-5.43.0/plugin/CMakeLists.txt
--- old/qqc2-desktop-style-5.42.0/plugin/CMakeLists.txt 2018-01-06
00:42:43.000000000 +0100
+++ new/qqc2-desktop-style-5.43.0/plugin/CMakeLists.txt 2018-02-05
09:12:29.000000000 +0100
@@ -15,7 +15,7 @@
endif()
add_library(qqc2desktopstyleplugin SHARED ${qqc2desktopstyle_SRCS})
-target_link_libraries(qqc2desktopstyleplugin Qt5::Core Qt5::Qml Qt5::Quick
Qt5::Gui Qt5::Widgets KF5::Kirigami2)
+target_link_libraries(qqc2desktopstyleplugin Qt5::Core Qt5::Qml Qt5::Quick
Qt5::Gui Qt5::Widgets KF5::Kirigami2)
if(KF5ConfigWidgets_FOUND)
target_link_libraries(qqc2desktopstyleplugin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qqc2-desktop-style-5.42.0/plugin/kquickpadding_p.h
new/qqc2-desktop-style-5.43.0/plugin/kquickpadding_p.h
--- old/qqc2-desktop-style-5.42.0/plugin/kquickpadding_p.h 2018-01-06
00:42:43.000000000 +0100
+++ new/qqc2-desktop-style-5.43.0/plugin/kquickpadding_p.h 2018-02-05
09:12:29.000000000 +0100
@@ -59,7 +59,7 @@
int m_bottom;
public:
- KQuickPadding(QObject *parent = 0) :
+ KQuickPadding(QObject *parent = nullptr) :
QObject(parent),
m_left(0),
m_top(0),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qqc2-desktop-style-5.42.0/plugin/kquickstyleitem.cpp
new/qqc2-desktop-style-5.43.0/plugin/kquickstyleitem.cpp
--- old/qqc2-desktop-style-5.42.0/plugin/kquickstyleitem.cpp 2018-01-06
00:42:43.000000000 +0100
+++ new/qqc2-desktop-style-5.43.0/plugin/kquickstyleitem.cpp 2018-02-05
09:12:29.000000000 +0100
@@ -58,7 +58,7 @@
KQuickStyleItem::KQuickStyleItem(QQuickItem *parent)
: QQuickItem(parent),
- m_styleoption(0),
+ m_styleoption(nullptr),
m_itemType(Undefined),
m_sunken(false),
m_raised(false),
@@ -156,7 +156,7 @@
else
delete m_styleoption;
- m_styleoption = 0;
+ m_styleoption = nullptr;
}
void KQuickStyleItem::initStyleOption()
@@ -188,7 +188,7 @@
QStyleOptionButton *opt =
qstyleoption_cast<QStyleOptionButton*>(m_styleoption);
opt->text = text();
opt->icon = m_properties[QStringLiteral("icon")].value<QIcon>();
- int e = qApp->style()->pixelMetric(QStyle::PM_ButtonIconSize,
m_styleoption, 0);
+ int e = qApp->style()->pixelMetric(QStyle::PM_ButtonIconSize,
m_styleoption, nullptr);
opt->iconSize = QSize(e, e);
opt->features = activeControl() == QLatin1String("default") ?
QStyleOptionButton::DefaultButton :
@@ -299,7 +299,7 @@
if (opt->icon.isNull() && !opt->text.isEmpty())
opt->toolButtonStyle = Qt::ToolButtonTextOnly;
- int e = qApp->style()->pixelMetric(QStyle::PM_ToolBarIconSize,
m_styleoption, 0);
+ int e = qApp->style()->pixelMetric(QStyle::PM_ToolBarIconSize,
m_styleoption, nullptr);
opt->iconSize = QSize(e, e);
const QFont font = qApp->font("QToolButton");
@@ -738,7 +738,7 @@
case SpinBox :{
subcontrol = qApp->style()->hitTestComplexControl(QStyle::CC_SpinBox,
qstyleoption_cast<QStyleOptionComplex*>(m_styleoption),
- QPoint(px,py), 0);
+ QPoint(px,py),
nullptr);
if (subcontrol == QStyle::SC_SpinBoxUp)
return QStringLiteral("up");
else if (subcontrol == QStyle::SC_SpinBoxDown)
@@ -749,7 +749,7 @@
case Slider: {
subcontrol = qApp->style()->hitTestComplexControl(QStyle::CC_Slider,
qstyleoption_cast<QStyleOptionComplex*>(m_styleoption),
- QPoint(px,py), 0);
+ QPoint(px,py),
nullptr);
if (subcontrol == QStyle::SC_SliderHandle)
return QStringLiteral("handle");
}
@@ -758,7 +758,7 @@
case ScrollBar: {
subcontrol = qApp->style()->hitTestComplexControl(QStyle::CC_ScrollBar,
qstyleoption_cast<QStyleOptionComplex*>(m_styleoption),
- QPoint(px,py), 0);
+ QPoint(px,py),
nullptr);
switch (subcontrol) {
case QStyle::SC_ScrollBarSlider:
return QStringLiteral("handle");
@@ -865,7 +865,7 @@
// We have to create a new style option since we might be calling
with a QStyleOptionSpinBox
QStyleOptionFrame frame;
frame.state = m_styleoption->state;
- frame.lineWidth =
qApp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, 0);
+ frame.lineWidth =
qApp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption,
nullptr);
frame.rect = m_styleoption->rect;
frame.styleObject = this;
size = qApp->style()->sizeFromContents(QStyle::CT_LineEdit,
&frame, QSize(width, height));
@@ -907,7 +907,7 @@
case ComboBoxItem:
if (static_cast<QStyleOptionMenuItem *>(m_styleoption)->menuItemType
== QStyleOptionMenuItem::Scroller) {
size.setHeight(qMax(QApplication::globalStrut().height(),
-
qApp->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, 0)));
+
qApp->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, nullptr, nullptr)));
} else {
size = qApp->style()->sizeFromContents(QStyle::CT_MenuItem,
m_styleoption, QSize(width,height));
}
@@ -1002,47 +1002,47 @@
{
if (metric == QLatin1String("scrollbarExtent"))
- return qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent, nullptr);
else if (metric == QLatin1String("defaultframewidth"))
return qApp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth,
m_styleoption);
else if (metric == QLatin1String("taboverlap"))
- return qApp->style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_TabBarTabOverlap,
nullptr);
else if (metric == QLatin1String("tabbaseoverlap"))
- return qApp->style()->pixelMetric(QStyle::PM_TabBarBaseOverlap,
m_styleoption );
+ return qApp->style()->pixelMetric(QStyle::PM_TabBarBaseOverlap,
m_styleoption);
else if (metric == QLatin1String("tabhspace"))
- return qApp->style()->pixelMetric(QStyle::PM_TabBarTabHSpace, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_TabBarTabHSpace, nullptr);
else if (metric == QLatin1String("indicatorwidth"))
- return qApp->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth,
0 );
+ return qApp->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth,
nullptr);
else if (metric == QLatin1String("tabvspace"))
- return qApp->style()->pixelMetric(QStyle::PM_TabBarTabVSpace, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_TabBarTabVSpace, nullptr);
else if (metric == QLatin1String("tabbaseheight"))
- return qApp->style()->pixelMetric(QStyle::PM_TabBarBaseHeight, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_TabBarBaseHeight,
nullptr);
else if (metric == QLatin1String("tabvshift"))
- return qApp->style()->pixelMetric(QStyle::PM_TabBarTabShiftVertical, 0
);
+ return qApp->style()->pixelMetric(QStyle::PM_TabBarTabShiftVertical,
nullptr);
else if (metric == QLatin1String("menubarhmargin"))
- return qApp->style()->pixelMetric(QStyle::PM_MenuBarHMargin, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_MenuBarHMargin, nullptr);
else if (metric == QLatin1String("menubarvmargin"))
- return qApp->style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_MenuBarVMargin, nullptr);
else if (metric == QLatin1String("menubarpanelwidth"))
- return qApp->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth,
nullptr);
else if (metric == QLatin1String("menubaritemspacing"))
- return qApp->style()->pixelMetric(QStyle::PM_MenuBarItemSpacing, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_MenuBarItemSpacing,
nullptr);
else if (metric == QLatin1String("spacebelowmenubar"))
return
qApp->style()->styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar,
m_styleoption);
else if (metric == QLatin1String("menuhmargin"))
- return qApp->style()->pixelMetric(QStyle::PM_MenuHMargin, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_MenuHMargin, nullptr);
else if (metric == QLatin1String("menuvmargin"))
- return qApp->style()->pixelMetric(QStyle::PM_MenuVMargin, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_MenuVMargin, nullptr);
else if (metric == QLatin1String("menupanelwidth"))
- return qApp->style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_MenuPanelWidth, nullptr);
else if (metric == QLatin1String("submenuoverlap"))
- return qApp->style()->pixelMetric(QStyle::PM_SubMenuOverlap, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_SubMenuOverlap, nullptr);
else if (metric == QLatin1String("splitterwidth"))
- return qApp->style()->pixelMetric(QStyle::PM_SplitterWidth, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_SplitterWidth, nullptr);
else if (metric == QLatin1String("scrollbarspacing"))
- return
abs(qApp->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, 0 ));
+ return
abs(qApp->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing,
nullptr));
else if (metric == QLatin1String("treeviewindentation"))
- return qApp->style()->pixelMetric(QStyle::PM_TreeViewIndentation, 0 );
+ return qApp->style()->pixelMetric(QStyle::PM_TreeViewIndentation,
nullptr);
return 0;
}
@@ -1113,7 +1113,7 @@
emit elementTypeChanged();
if (m_styleoption) {
delete m_styleoption;
- m_styleoption = 0;
+ m_styleoption = nullptr;
}
// Only enable visible if the widget can animate
@@ -1245,7 +1245,7 @@
case ItemBranchIndicator: {
QStyleOption opt;
opt.rect = QRect(0, 0, implicitWidth(), implicitHeight());
- return
qApp->style()->subElementRect(QStyle::SE_TreeViewDisclosureItem, &opt, 0);
+ return
qApp->style()->subElementRect(QStyle::SE_TreeViewDisclosureItem, &opt, nullptr);
}
default:
break;
@@ -1453,7 +1453,7 @@
break;
case Menu: {
QStyleHintReturnMask val;
- qApp->style()->styleHint(QStyle::SH_Menu_Mask, m_styleoption, 0, &val);
+ qApp->style()->styleHint(QStyle::SH_Menu_Mask, m_styleoption, nullptr,
&val);
painter->save();
painter->setClipRegion(val.region);
painter->fillRect(m_styleoption->rect,
m_styleoption->palette.window());
@@ -1558,7 +1558,7 @@
{
if (m_image.isNull()) {
delete node;
- return 0;
+ return nullptr;
}
QSGNinePatchNode *styleNode = static_cast<QSGNinePatchNode *>(node);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qqc2-desktop-style-5.42.0/plugin/kquickstyleitem_p.h
new/qqc2-desktop-style-5.43.0/plugin/kquickstyleitem_p.h
--- old/qqc2-desktop-style-5.42.0/plugin/kquickstyleitem_p.h 2018-01-06
00:42:43.000000000 +0100
+++ new/qqc2-desktop-style-5.43.0/plugin/kquickstyleitem_p.h 2018-02-05
09:12:29.000000000 +0100
@@ -60,7 +60,7 @@
public:
QQuickTableRowImageProvider1()
: QQuickImageProvider(QQuickImageProvider::Pixmap) {}
- QPixmap requestPixmap(const QString &id, QSize *size, const QSize
&requestedSize);
+ QPixmap requestPixmap(const QString &id, QSize *size, const QSize
&requestedSize) override;
};
class KQuickStyleItem: public QQuickItem
@@ -105,8 +105,8 @@
KQuickPadding* border() { return &m_border; }
public:
- KQuickStyleItem(QQuickItem *parent = 0);
- ~KQuickStyleItem();
+ KQuickStyleItem(QQuickItem *parent = nullptr);
+ ~KQuickStyleItem() override;
enum MenuItemType {
SeparatorType = 0,
@@ -263,9 +263,9 @@
void textureHeightChanged(int h);
protected:
- virtual bool event(QEvent *);
- virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
- virtual void updatePolish();
+ bool event(QEvent *) override;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
+ void updatePolish() override;
bool eventFilter(QObject *watched, QEvent *event) override;
private:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qqc2-desktop-style-5.42.0/plugin/qqc2desktopstyleplugin.h
new/qqc2-desktop-style-5.43.0/plugin/qqc2desktopstyleplugin.h
--- old/qqc2-desktop-style-5.42.0/plugin/qqc2desktopstyleplugin.h
2018-01-06 00:42:43.000000000 +0100
+++ new/qqc2-desktop-style-5.43.0/plugin/qqc2desktopstyleplugin.h
2018-02-05 09:12:29.000000000 +0100
@@ -30,7 +30,7 @@
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
- void registerTypes(const char *uri);
+ void registerTypes(const char *uri) override;
};
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qqc2-desktop-style-5.42.0/plugin/qsgdefaultninepatchnode_p.h
new/qqc2-desktop-style-5.43.0/plugin/qsgdefaultninepatchnode_p.h
--- old/qqc2-desktop-style-5.42.0/plugin/qsgdefaultninepatchnode_p.h
2018-01-06 00:42:43.000000000 +0100
+++ new/qqc2-desktop-style-5.43.0/plugin/qsgdefaultninepatchnode_p.h
2018-02-05 09:12:29.000000000 +0100
@@ -62,7 +62,7 @@
{
public:
QSGDefaultNinePatchNode();
- ~QSGDefaultNinePatchNode();
+ ~QSGDefaultNinePatchNode() override;
void setTexture(QSGTexture *texture) override;
void setBounds(const QRectF &bounds) override;