Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qqc2-desktop-style for openSUSE:Factory checked in at 2021-08-16 10:08:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qqc2-desktop-style (Old) and /work/SRC/openSUSE:Factory/.qqc2-desktop-style.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qqc2-desktop-style" Mon Aug 16 10:08:21 2021 rev:49 rq:912177 version:5.85.0 Changes: -------- --- /work/SRC/openSUSE:Factory/qqc2-desktop-style/qqc2-desktop-style.changes 2021-07-16 00:02:09.148756265 +0200 +++ /work/SRC/openSUSE:Factory/.qqc2-desktop-style.new.1899/qqc2-desktop-style.changes 2021-08-16 10:12:41.199021019 +0200 @@ -1,0 +2,15 @@ +Fri Aug 6 12:13:38 UTC 2021 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.85.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.85.0 +- Changes since 5.84.0: + * Introduce MenuBar implementation + * Make sure raised is initialised + * Do not create an extra KIconLoader just for custom palettes + * Use flat instead of raised for flat buttons and toolbuttons (kde#438525) + * DialogButtonBox: remove unnecessary lines + * DialogButtonBox: Set standard icons for standard buttons + +------------------------------------------------------------------- Old: ---- qqc2-desktop-style-5.84.0.tar.xz qqc2-desktop-style-5.84.0.tar.xz.sig New: ---- qqc2-desktop-style-5.85.0.tar.xz qqc2-desktop-style-5.85.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qqc2-desktop-style.spec ++++++ --- /var/tmp/diff_new_pack.IUJhhJ/_old 2021-08-16 10:12:41.707020423 +0200 +++ /var/tmp/diff_new_pack.IUJhhJ/_new 2021-08-16 10:12:41.707020423 +0200 @@ -16,11 +16,11 @@ # -%define _tar_path 5.84 +%define _tar_path 5.85 # Only needed for the package signature condition %bcond_without lang Name: qqc2-desktop-style -Version: 5.84.0 +Version: 5.85.0 Release: 0 Summary: A Qt Quick Controls 2 Style for Desktop UIs License: GPL-2.0-or-later ++++++ qqc2-desktop-style-5.84.0.tar.xz -> qqc2-desktop-style-5.85.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/CMakeLists.txt new/qqc2-desktop-style-5.85.0/CMakeLists.txt --- old/qqc2-desktop-style-5.84.0/CMakeLists.txt 2021-07-01 16:26:47.000000000 +0200 +++ new/qqc2-desktop-style-5.85.0/CMakeLists.txt 2021-07-16 18:30:35.000000000 +0200 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "5.84.0") # handled by release scripts -set(KF_DEP_VERSION "5.84.0") # handled by release scripts +set(KF_VERSION "5.85.0") # handled by release scripts +set(KF_DEP_VERSION "5.85.0") # handled by release scripts project(qqc2-desktop-style VERSION ${KF_VERSION}) @@ -21,7 +21,7 @@ ################# set KDE specific information ################# -find_package(ECM 5.84.0 REQUIRED NO_MODULE) +find_package(ECM 5.85.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}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp new/qqc2-desktop-style-5.85.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp --- old/qqc2-desktop-style-5.84.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp 2021-07-01 16:26:47.000000000 +0200 +++ new/qqc2-desktop-style-5.85.0/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp 2021-07-16 18:30:35.000000000 +0200 @@ -13,21 +13,12 @@ #include <QQmlEngine> #include <QQuickRenderControl> #include <QQuickWindow> +#include <QScopeGuard> #include <KColorScheme> #include <KConfigGroup> #include <QDBusConnection> -class IconLoaderSingleton -{ -public: - IconLoaderSingleton() = default; - - KIconLoader self; -}; - -Q_GLOBAL_STATIC(IconLoaderSingleton, privateIconLoaderSelf) - class StyleSingleton : public QObject { Q_OBJECT @@ -244,9 +235,19 @@ } } - privateIconLoaderSelf->self.setCustomPalette(pal); + bool hadPalette = KIconLoader::global()->hasCustomPalette(); + QPalette olderPalette = KIconLoader::global()->customPalette(); + + auto cleanup = qScopeGuard([&] { + if (hadPalette) { + KIconLoader::global()->setCustomPalette(olderPalette); + } else { + KIconLoader::global()->resetPalette(); + } + }); - return KDE::icon(name, &privateIconLoaderSelf->self); + KIconLoader::global()->setCustomPalette(pal); + return KDE::icon(name, KIconLoader::global()); } void PlasmaDesktopTheme::syncColors() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/org.kde.desktop/Button.qml new/qqc2-desktop-style-5.85.0/org.kde.desktop/Button.qml --- old/qqc2-desktop-style-5.84.0/org.kde.desktop/Button.qml 2021-07-01 16:26:47.000000000 +0200 +++ new/qqc2-desktop-style-5.85.0/org.kde.desktop/Button.qml 2021-07-16 18:30:35.000000000 +0200 @@ -37,8 +37,9 @@ anchors.fill: parent control: controlRoot elementType: "button" - sunken: controlRoot.down || (controlRoot.checkable && controlRoot.checked) - raised: !(controlRoot.down || (controlRoot.checkable && controlRoot.checked)) + sunken: controlRoot.down + on: controlRoot.checkable && controlRoot.checked + flat: controlRoot.flat hover: controlRoot.hovered text: controlRoot.Kirigami.MnemonicData.mnemonicLabel hasFocus: controlRoot.activeFocus || controlRoot.highlighted @@ -48,7 +49,6 @@ "iconColor": controlRoot.icon && controlRoot.icon.color.a > 0? controlRoot.icon.color : Kirigami.Theme.textColor, "iconWidth": controlRoot.icon && controlRoot.icon.width ? controlRoot.icon.width : 0, "iconHeight": controlRoot.icon && controlRoot.icon.height ? controlRoot.icon.height : 0, - "flat": controlRoot.flat } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/org.kde.desktop/DialogButtonBox.qml new/qqc2-desktop-style-5.85.0/org.kde.desktop/DialogButtonBox.qml --- old/qqc2-desktop-style-5.84.0/org.kde.desktop/DialogButtonBox.qml 2021-07-01 16:26:47.000000000 +0200 +++ new/qqc2-desktop-style-5.85.0/org.kde.desktop/DialogButtonBox.qml 2021-07-16 18:30:35.000000000 +0200 @@ -13,8 +13,6 @@ T.DialogButtonBox { id: control - palette: Kirigami.Theme.palette - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, @@ -46,5 +44,38 @@ snapMode: ListView.SnapToItem } - background: Item {} + // Standard buttons are destroyed and then recreated every time + // the `standardButtons` property changes, so it is necessary to + // run this code every time standardButtonsChanged() is emitted. + // See QQuickDialogButtonBox::setStandardButtons() + onStandardButtonsChanged: { + // standardButton() returns a pointer to an existing standard button. + // If no such button exists, it returns nullptr. + // Icon names are copied from KStyle::standardIcon() + function setStandardIcon(buttonType, iconName) { + let button = standardButton(buttonType) + // For some reason, `== ""` works, but `=== ""` and `!name && !source` doesn't. + if (button && button.icon.name == "" && button.icon.source == "") { + button.icon.name = iconName + } + } + setStandardIcon(T.Dialog.Ok, "dialog-ok") + setStandardIcon(T.Dialog.Save, "document-save") + setStandardIcon(T.Dialog.SaveAll, "document-save-all") + setStandardIcon(T.Dialog.Open, "document-open") + setStandardIcon(T.Dialog.Yes, "dialog-ok-apply") + setStandardIcon(T.Dialog.YesToAll, "dialog-ok") + setStandardIcon(T.Dialog.No, "dialog-cancel") + setStandardIcon(T.Dialog.NoToAll, "dialog-cancel") + setStandardIcon(T.Dialog.Abort, "dialog-cancel") + setStandardIcon(T.Dialog.Retry, "view-refresh") + setStandardIcon(T.Dialog.Ignore, "dialog-cancel") + setStandardIcon(T.Dialog.Close, "dialog-close") + setStandardIcon(T.Dialog.Cancel, "dialog-cancel") + setStandardIcon(T.Dialog.Discard, "edit-delete") + setStandardIcon(T.Dialog.Help, "help-contents") + setStandardIcon(T.Dialog.Apply, "dialog-ok-apply") + setStandardIcon(T.Dialog.Reset, "edit-undo") + setStandardIcon(T.Dialog.RestoreDefaults, "document-revert") + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/org.kde.desktop/MenuBar.qml new/qqc2-desktop-style-5.85.0/org.kde.desktop/MenuBar.qml --- old/qqc2-desktop-style-5.84.0/org.kde.desktop/MenuBar.qml 1970-01-01 01:00:00.000000000 +0100 +++ new/qqc2-desktop-style-5.85.0/org.kde.desktop/MenuBar.qml 2021-07-16 18:30:35.000000000 +0200 @@ -0,0 +1,35 @@ +/* + SPDX-FileCopyrightText: 2021 Carson Black <uhh...@gmail.com> + + SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-or-later +*/ + + +import QtQuick 2.6 +import QtQuick.Layouts 1.2 +import QtQuick.Templates @QQC2_VERSION@ as T +import org.kde.kirigami 2.4 as Kirigami + +T.MenuBar { + id: controlRoot + + palette: Kirigami.Theme.palette + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + contentHeight + topPadding + bottomPadding) + + delegate: MenuBarItem { + } + + contentItem: Row { + spacing: controlRoot.spacing + Repeater { + model: controlRoot.contentModel + } + } + + background: Rectangle { + color: Kirigami.Theme.backgroundColor + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/org.kde.desktop/MenuBarItem.qml new/qqc2-desktop-style-5.85.0/org.kde.desktop/MenuBarItem.qml --- old/qqc2-desktop-style-5.84.0/org.kde.desktop/MenuBarItem.qml 2021-07-01 16:26:47.000000000 +0200 +++ new/qqc2-desktop-style-5.85.0/org.kde.desktop/MenuBarItem.qml 2021-07-16 18:30:35.000000000 +0200 @@ -19,7 +19,6 @@ implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding baselineOffset: contentItem.y + contentItem.baselineOffset - Layout.fillWidth: true leftPadding: Kirigami.Units.largeSpacing rightPadding: Kirigami.Units.largeSpacing topPadding: Kirigami.Units.smallSpacing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/org.kde.desktop/ScrollView.qml new/qqc2-desktop-style-5.85.0/org.kde.desktop/ScrollView.qml --- old/qqc2-desktop-style-5.84.0/org.kde.desktop/ScrollView.qml 2021-07-01 16:26:47.000000000 +0200 +++ new/qqc2-desktop-style-5.85.0/org.kde.desktop/ScrollView.qml 2021-07-16 18:30:35.000000000 +0200 @@ -24,7 +24,7 @@ Kirigami.Theme.colorSet: Kirigami.Theme.View Kirigami.Theme.inherit: !background || !background.visible - //size in pixel to accomodate the border drawn by qstyle + //size in pixel to accommodate the border drawn by qstyle leftPadding: (internal.backgroundVisible && background.hasOwnProperty("leftPadding") ? background.leftPadding : 0) + (LayoutMirroring.enabled ? internal.verticalScrollBarWidth : 0) topPadding: internal.backgroundVisible && background.hasOwnProperty("topPadding") ? background.topPadding : 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/org.kde.desktop/ToolButton.qml new/qqc2-desktop-style-5.85.0/org.kde.desktop/ToolButton.qml --- old/qqc2-desktop-style-5.84.0/org.kde.desktop/ToolButton.qml 2021-07-01 16:26:47.000000000 +0200 +++ new/qqc2-desktop-style-5.85.0/org.kde.desktop/ToolButton.qml 2021-07-16 18:30:35.000000000 +0200 @@ -43,12 +43,13 @@ anchors.fill:parent control: controlRoot elementType: "toolbutton" - on: controlRoot.pressed || (controlRoot.checkable && controlRoot.checked) + sunken: controlRoot.down + on: controlRoot.checkable && controlRoot.checked hover: controlRoot.hovered text: controlRoot.Kirigami.MnemonicData.mnemonicLabel hasFocus: controlRoot.visualFocus || (!controlRoot.flat && controlRoot.pressed) || controlRoot.highlighted activeControl: controlRoot.isDefault ? "default" : "f" - raised: !controlRoot.flat + flat: controlRoot.flat // Set this to true to have the style render a menu arrow for the // ToolButton. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/org.kde.desktop/ToolTip.qml new/qqc2-desktop-style-5.85.0/org.kde.desktop/ToolTip.qml --- old/qqc2-desktop-style-5.84.0/org.kde.desktop/ToolTip.qml 2021-07-01 16:26:47.000000000 +0200 +++ new/qqc2-desktop-style-5.85.0/org.kde.desktop/ToolTip.qml 2021-07-16 18:30:35.000000000 +0200 @@ -24,7 +24,7 @@ // Always show the tooltip on top of everything else z: 999 - // Math.ceil() prevents blurry edges and prevents unecessary text wrapping + // Math.ceil() prevents blurry edges and prevents unnecessary text wrapping // (vs using floor or sometimes round). implicitWidth: Math.ceil(contentItem.implicitWidth) + leftPadding + rightPadding implicitHeight: Math.ceil(contentItem.implicitHeight) + topPadding + bottomPadding diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/plugin/kquickstyleitem.cpp new/qqc2-desktop-style-5.85.0/plugin/kquickstyleitem.cpp --- old/qqc2-desktop-style-5.84.0/plugin/kquickstyleitem.cpp 2021-07-01 16:26:47.000000000 +0200 +++ new/qqc2-desktop-style-5.85.0/plugin/kquickstyleitem.cpp 2021-07-16 18:30:35.000000000 +0200 @@ -39,6 +39,7 @@ , m_itemType(Undefined) , m_sunken(false) , m_raised(false) + , m_flat(false) , m_active(true) , m_selected(false) , m_focus(false) @@ -86,7 +87,7 @@ connect(this, &KQuickStyleItem::textChanged, this, &KQuickStyleItem::updateSizeHint); connect(this, &KQuickStyleItem::textChanged, this, &KQuickStyleItem::updateItem); connect(this, &KQuickStyleItem::activeChanged, this, &KQuickStyleItem::updateItem); - connect(this, &KQuickStyleItem::raisedChanged, this, &KQuickStyleItem::updateItem); + connect(this, &KQuickStyleItem::flatChanged, this, &KQuickStyleItem::updateItem); connect(this, &KQuickStyleItem::sunkenChanged, this, &KQuickStyleItem::updateItem); connect(this, &KQuickStyleItem::hoverChanged, this, &KQuickStyleItem::updateItem); connect(this, &KQuickStyleItem::maximumChanged, this, &KQuickStyleItem::updateItem); @@ -193,7 +194,7 @@ } opt->iconSize = iconSize; opt->features = activeControl() == QLatin1String("default") ? QStyleOptionButton::DefaultButton : QStyleOptionButton::None; - if (m_properties[QStringLiteral("flat")].toBool()) { + if (m_flat) { opt->features |= QStyleOptionButton::Flat; } const QFont font = qApp->font("QPushButton"); @@ -287,7 +288,7 @@ QStyleOptionToolButton *opt = qstyleoption_cast<QStyleOptionToolButton *>(m_styleoption); opt->subControls = QStyle::SC_ToolButton; - if (!m_raised) { + if (m_flat) { opt->state |= QStyle::State_AutoRaise; } @@ -298,7 +299,7 @@ auto iconSize = QSize(m_properties[QStringLiteral("iconWidth")].toInt(), m_properties[QStringLiteral("iconHeight")].toInt()); if (iconSize.isEmpty()) { - const auto metric = m_raised ? QStyle::PM_ButtonIconSize : QStyle::PM_ToolBarIconSize; + const auto metric = m_flat ? QStyle::PM_ToolBarIconSize : QStyle::PM_ButtonIconSize; int e = KQuickStyleItem::style()->pixelMetric(metric, m_styleoption, nullptr); if (iconSize.width() <= 0) { iconSize.setWidth(e); @@ -686,7 +687,7 @@ if (m_sunken) m_styleoption->state |= QStyle::State_Sunken; - if (m_raised) + if (!m_sunken || m_raised) m_styleoption->state |= QStyle::State_Raised; if (m_selected) m_styleoption->state |= QStyle::State_Selected; @@ -1481,7 +1482,7 @@ // Set AA_UseHighDpiPixmaps when calling style code to make QIcon return // "retina" pixmaps. The flag is controlled by the application so we can't - // set it unconditinally. + // set it unconditionally. QHighDpiPixmapsEnabler1 enabler; switch (m_itemType) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.84.0/plugin/kquickstyleitem_p.h new/qqc2-desktop-style-5.85.0/plugin/kquickstyleitem_p.h --- old/qqc2-desktop-style-5.84.0/plugin/kquickstyleitem_p.h 2021-07-01 16:26:47.000000000 +0200 +++ new/qqc2-desktop-style-5.85.0/plugin/kquickstyleitem_p.h 2021-07-16 18:30:35.000000000 +0200 @@ -44,6 +44,7 @@ Q_PROPERTY(bool sunken READ sunken WRITE setSunken NOTIFY sunkenChanged) Q_PROPERTY(bool raised READ raised WRITE setRaised NOTIFY raisedChanged) + Q_PROPERTY(bool flat READ flat WRITE setFlat NOTIFY flatChanged) Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged) Q_PROPERTY(bool selected READ selected WRITE setSelected NOTIFY selectedChanged) Q_PROPERTY(bool hasFocus READ hasFocus WRITE sethasFocus NOTIFY hasFocusChanged) @@ -142,6 +143,10 @@ { return m_raised; } + bool flat() const + { + return m_flat; + } bool active() const { return m_active; @@ -232,6 +237,13 @@ Q_EMIT raisedChanged(); } } + void setFlat(bool flat) + { + if (m_flat != flat) { + m_flat = flat; + Q_EMIT flatChanged(); + } + } void setActive(bool active) { if (m_active != active) { @@ -401,6 +413,7 @@ void textChanged(); void sunkenChanged(); void raisedChanged(); + void flatChanged(); void activeChanged(); void selectedChanged(); void hasFocusChanged(); @@ -461,6 +474,7 @@ bool m_sunken; bool m_raised; + bool m_flat; bool m_active; bool m_selected; bool m_focus;