commit qqc2-desktop-style for openSUSE:Factory
Hello community, here is the log from the commit of package qqc2-desktop-style for openSUSE:Factory checked in at 2019-05-22 11:12:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qqc2-desktop-style (Old) and /work/SRC/openSUSE:Factory/.qqc2-desktop-style.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "qqc2-desktop-style" Wed May 22 11:12:59 2019 rev:22 rq:703393 version:5.58.0 Changes: -------- --- /work/SRC/openSUSE:Factory/qqc2-desktop-style/qqc2-desktop-style.changes 2019-05-02 19:16:36.113339115 +0200 +++ /work/SRC/openSUSE:Factory/.qqc2-desktop-style.new.5148/qqc2-desktop-style.changes 2019-05-22 11:12:59.642570651 +0200 @@ -1,0 +2,18 @@ +Wed May 15 18:16:19 UTC 2019 - lbeltrame@kde.org + +- Update to 5.58.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.58.0.php +- Changes since 5.57.0: + * Avoid nesting Controls in TextField (kde#406851) + * make the mobile text toolbar appear only on press + * [TabBar] Update height when TabButtons are added dynamically + * refer to the proper id + * use the new Kirigami.WheelHandler + * Support custom icon size for ToolButton + * It compile fine without foreach +Refreshed patches: + * 0001-Fix-MobileTextActionsToolBar.qml-with-Qt-5.9.patch + +------------------------------------------------------------------- Old: ---- qqc2-desktop-style-5.57.0.tar.xz New: ---- qqc2-desktop-style-5.58.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qqc2-desktop-style.spec ++++++ --- /var/tmp/diff_new_pack.ylpRH8/_old 2019-05-22 11:13:01.082570286 +0200 +++ /var/tmp/diff_new_pack.ylpRH8/_new 2019-05-22 11:13:01.122570276 +0200 @@ -16,9 +16,9 @@ # -%define _tar_path 5.57 +%define _tar_path 5.58 Name: qqc2-desktop-style -Version: 5.57.0 +Version: 5.58.0 Release: 0 Summary: A Qt Quick Controls 2 Style for Desktop UIs License: GPL-2.0-or-later ++++++ 0001-Fix-MobileTextActionsToolBar.qml-with-Qt-5.9.patch ++++++ --- /var/tmp/diff_new_pack.ylpRH8/_old 2019-05-22 11:13:01.358570216 +0200 +++ /var/tmp/diff_new_pack.ylpRH8/_new 2019-05-22 11:13:01.374570212 +0200 @@ -7,36 +7,34 @@ org.kde.desktop/private/MobileTextActionsToolBar.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/org.kde.desktop/private/MobileTextActionsToolBar.qml b/org.kde.desktop/private/MobileTextActionsToolBar.qml -index e1e0043..c0953a2 100644 ---- a/org.kde.desktop/private/MobileTextActionsToolBar.qml -+++ b/org.kde.desktop/private/MobileTextActionsToolBar.qml -@@ -57,7 +57,7 @@ Popup { +Index: qqc2-desktop-style-5.56.0git.20190424T214652~06ea48c/org.kde.desktop/private/MobileTextActionsToolBar.qml +=================================================================== +--- qqc2-desktop-style-5.56.0git.20190424T214652~06ea48c.orig/org.kde.desktop/private/MobileTextActionsToolBar.qml 2019-04-25 08:40:38.789971927 +0200 ++++ qqc2-desktop-style-5.56.0git.20190424T214652~06ea48c/org.kde.desktop/private/MobileTextActionsToolBar.qml 2019-04-25 08:42:16.320959453 +0200 +@@ -58,7 +58,7 @@ contentItem: RowLayout { ToolButton { focusPolicy: Qt.NoFocus - icon.name: "edit-cut" + @DISABLE_UNDER_QQC2_2_3@ icon.name: "edit-cut" - visible: controlRoot.selectedText.length > 0 + visible: controlRoot.selectedText.length > 0 && (!controlRoot.hasOwnProperty("echoMode") || controlRoot.echoMode === TextInput.Normal) onClicked: { controlRoot.cut(); -@@ -65,7 +65,7 @@ Popup { +@@ -66,7 +66,7 @@ } ToolButton { focusPolicy: Qt.NoFocus - icon.name: "edit-copy" + @DISABLE_UNDER_QQC2_2_3@ icon.name: "edit-copy" - visible: controlRoot.selectedText.length > 0 + visible: controlRoot.selectedText.length > 0 && (!controlRoot.hasOwnProperty("echoMode") || controlRoot.echoMode === TextInput.Normal) onClicked: { controlRoot.copy(); -@@ -73,7 +73,7 @@ Popup { +@@ -74,7 +74,7 @@ } ToolButton { focusPolicy: Qt.NoFocus - icon.name: "edit-paste" + @DISABLE_UNDER_QQC2_2_3@ icon.name: "edit-paste" + visible: controlRoot.canPaste onClicked: { controlRoot.paste(); - } --- -2.20.1 ++++++ qqc2-desktop-style-5.57.0.tar.xz -> qqc2-desktop-style-5.58.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.57.0/CMakeLists.txt new/qqc2-desktop-style-5.58.0/CMakeLists.txt --- old/qqc2-desktop-style-5.57.0/CMakeLists.txt 2019-04-07 09:21:46.000000000 +0200 +++ new/qqc2-desktop-style-5.58.0/CMakeLists.txt 2019-05-05 00:46:57.000000000 +0200 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.57.0") # handled by release scripts -set(KF5_DEP_VERSION "5.57.0") # handled by release scripts +set(KF5_VERSION "5.58.0") # handled by release scripts +set(KF5_DEP_VERSION "5.58.0") # handled by release scripts project(qqc2-desktop-style VERSION ${KF5_VERSION}) @@ -21,7 +21,7 @@ ################# set KDE specific information ################# -find_package(ECM 5.57.0 REQUIRED NO_MODULE) +find_package(ECM 5.58.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}) @@ -87,7 +87,7 @@ SOVERSION 5) ######################################################################### - +add_definitions(-DQT_NO_FOREACH) add_subdirectory(plugin) if (KF5IconThemes_FOUND AND KF5WidgetsAddons_FOUND) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.57.0/org.kde.desktop/ComboBox.qml new/qqc2-desktop-style-5.58.0/org.kde.desktop/ComboBox.qml --- old/qqc2-desktop-style-5.57.0/org.kde.desktop/ComboBox.qml 2019-04-07 09:21:46.000000000 +0200 +++ new/qqc2-desktop-style-5.58.0/org.kde.desktop/ComboBox.qml 2019-05-05 00:46:57.000000000 +0200 @@ -151,6 +151,9 @@ } } + onTextChanged: Private.MobileTextActionsToolBar.shouldBeVisible = false; + onPressed: Private.MobileTextActionsToolBar.shouldBeVisible = true; + onPressAndHold: { if (!Kirigami.Settings.tabletMode) { return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.57.0/org.kde.desktop/ScrollView.qml new/qqc2-desktop-style-5.58.0/org.kde.desktop/ScrollView.qml --- old/qqc2-desktop-style-5.57.0/org.kde.desktop/ScrollView.qml 2019-04-07 09:21:46.000000000 +0200 +++ new/qqc2-desktop-style-5.58.0/org.kde.desktop/ScrollView.qml 2019-05-05 00:46:57.000000000 +0200 @@ -23,7 +23,7 @@ import QtQuick 2.9 import QtQuick.Controls @QQC2_VERSION@ import QtQuick.Templates @QQC2_VERSION@ as T -import org.kde.kirigami 2.4 as Kirigami +import org.kde.kirigami 2.9 as Kirigami import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate T.ScrollView { @@ -35,9 +35,6 @@ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) - contentWidth: scrollHelper.flickableItem ? scrollHelper.flickableItem.contentWidth : 0 - contentHeight: scrollHelper.flickableItem ? scrollHelper.flickableItem.contentHeight : 0 - Kirigami.Theme.colorSet: Kirigami.Theme.View Kirigami.Theme.inherit: !background || !background.visible @@ -54,88 +51,24 @@ } } - children: [ - MouseArea { - id: scrollHelper - anchors.fill: parent - drag.filterChildren: !Kirigami.Settings.isMobile - property bool isMobile: !verticalScrollBar.interactive - onIsMobileChanged: { - flickableItem.boundsBehavior = scrollHelper.isMobile ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds; - } - readonly property Flickable flickableItem: controlRoot.contentItem - - onFlickableItemChanged: { - - flickableItem.boundsBehavior = scrollHelper.isMobile ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds; - - //don't make the scrolling items overlap the background borders. - flickableItem.anchors.margins = Qt.binding(function() { return controlRoot.background && controlRoot.background.visible ? 2 : 0; }); - flickableItem.clip = true; - flickableItem.interactive = Kirigami.Settings.isMobile - flickableItem.parent = scrollHelper; - } - onPressed: { - mouse.accepted = false; - flickableItem.interactive = true; - } - onPositionChanged: { - mouse.accepted = false; - } - onReleased: { - mouse.accepted = false; - //flickableItem.interactive = false; - } - onWheel: { - if (isMobile || flickableItem.contentHeight < flickableItem.height) { - return; - } - - flickableItem.interactive = false; - var y = wheel.pixelDelta.y != 0 ? wheel.pixelDelta.y : wheel.angleDelta.y / 8 - - //if we don't have a pixeldelta, apply the configured mouse wheel lines - if (!wheel.pixelDelta.y) { - y *= Kirigami.Settings.mouseWheelScrollLines; - } - - var minYExtent = flickableItem.topMargin - flickableItem.originY; - var maxYExtent = flickableItem.height - (flickableItem.contentHeight + flickableItem.bottomMargin + flickableItem.originY); - - flickableItem.contentY = Math.min(-maxYExtent, Math.max(-minYExtent, flickableItem.contentY - y)); - - //this is just for making the scrollbar appear - flickableItem.flick(0, 0); - flickableItem.cancelFlick(); - } - - Connections { - target: scrollHelper.flickableItem - onFlickEnded: { - scrollHelper.flickableItem.interactive = false; - scrollHelper.flickableItem.contentY = Math.round(scrollHelper.flickableItem.contentY); - } - onMovementEnded: { - scrollHelper.flickableItem.interactive = false; - scrollHelper.flickableItem.contentY = Math.round(scrollHelper.flickableItem.contentY); - } - } - - /*create a background only after Component.onCompleted because: - * implementations can set their own background in a declarative way - * ScrollView {background.visible: true} must *not* work, becasue all upstream styles don't have a background so applications using this would break with other styles - * This is child of scrollHelper as it would break native scrollview finding of the flickable if it was a direct child - */ - Component { - id: backgroundComponent - StylePrivate.StyleItem { - control: controlRoot - elementType: "edit" - visible: false - sunken: true - hasFocus: controlRoot.activeFocus || scrollHelper.flickableItem.activeFocus - hover: controlRoot.hovered - } + data: [ + Kirigami.WheelHandler { + target: controlRoot.contentItem + }, + /*create a background only after Component.onCompleted because: + * implementations can set their own background in a declarative way + * ScrollView {background.visible: true} must *not* work, becasue all upstream styles don't have a background so applications using this would break with other styles + * This is child of scrollHelper as it would break native scrollview finding of the flickable if it was a direct child + */ + Component { + id: backgroundComponent + StylePrivate.StyleItem { + control: controlRoot + elementType: "edit" + visible: false + sunken: true + hasFocus: controlRoot.activeFocus || controlRoot.contentItem.activeFocus + hover: controlRoot.hovered } } ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.57.0/org.kde.desktop/TabBar.qml new/qqc2-desktop-style-5.58.0/org.kde.desktop/TabBar.qml --- old/qqc2-desktop-style-5.57.0/org.kde.desktop/TabBar.qml 2019-04-07 09:21:46.000000000 +0200 +++ new/qqc2-desktop-style-5.58.0/org.kde.desktop/TabBar.qml 2019-05-05 00:46:57.000000000 +0200 @@ -40,7 +40,8 @@ contentItem: ListView { implicitWidth: contentWidth - implicitHeight: controlRoot.contentModel.get(0).height + // The binding to contentModel.count is so it updates when the TabBar is populated on demand + implicitHeight: controlRoot.contentModel.get(controlRoot.contentModel.count * 0).height model: controlRoot.contentModel currentIndex: controlRoot.currentIndex diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.57.0/org.kde.desktop/TextArea.qml new/qqc2-desktop-style-5.58.0/org.kde.desktop/TextArea.qml --- old/qqc2-desktop-style-5.57.0/org.kde.desktop/TextArea.qml 2019-04-07 09:21:46.000000000 +0200 +++ new/qqc2-desktop-style-5.58.0/org.kde.desktop/TextArea.qml 2019-05-05 00:46:57.000000000 +0200 @@ -63,6 +63,9 @@ } } + onTextChanged: Private.MobileTextActionsToolBar.shouldBeVisible = false; + onPressed: Private.MobileTextActionsToolBar.shouldBeVisible = true; + onPressAndHold: { if (!Kirigami.Settings.tabletMode) { return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.57.0/org.kde.desktop/TextField.qml new/qqc2-desktop-style-5.58.0/org.kde.desktop/TextField.qml --- old/qqc2-desktop-style-5.57.0/org.kde.desktop/TextField.qml 2019-04-07 09:21:46.000000000 +0200 +++ new/qqc2-desktop-style-5.58.0/org.kde.desktop/TextField.qml 2019-05-05 00:46:57.000000000 +0200 @@ -67,6 +67,9 @@ } } + onTextChanged: Private.MobileTextActionsToolBar.shouldBeVisible = false; + onPressed: Private.MobileTextActionsToolBar.shouldBeVisible = true; + onPressAndHold: { if (!Kirigami.Settings.tabletMode) { return; @@ -83,13 +86,17 @@ y: rect.y + target.padding } - Controls.Label { + Text { id: placeholder x: controlRoot.leftPadding y: controlRoot.topPadding width: controlRoot.width - (controlRoot.leftPadding + controlRoot.rightPadding) height: controlRoot.height - (controlRoot.topPadding + controlRoot.bottomPadding) + // Work around Qt bug where NativeRendering breaks for non-integer scale factors + // https://bugreports.qt.io/browse/QTBUG-67007 + renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering + text: controlRoot.placeholderText font: controlRoot.font color: Kirigami.Theme.disabledTextColor diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.57.0/org.kde.desktop/private/MobileCursor.qml new/qqc2-desktop-style-5.58.0/org.kde.desktop/private/MobileCursor.qml --- old/qqc2-desktop-style-5.57.0/org.kde.desktop/private/MobileCursor.qml 2019-04-07 09:21:46.000000000 +0200 +++ new/qqc2-desktop-style-5.58.0/org.kde.desktop/private/MobileCursor.qml 2019-05-05 00:46:57.000000000 +0200 @@ -43,6 +43,7 @@ Rectangle { width: Math.round(Kirigami.Units.gridUnit/1.5) height: width + visible: MobileTextActionsToolBar.shouldBeVisible anchors { horizontalCenter: parent.horizontalCenter verticalCenter: parent.bottom diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.57.0/org.kde.desktop/private/MobileTextActionsToolBar.qml new/qqc2-desktop-style-5.58.0/org.kde.desktop/private/MobileTextActionsToolBar.qml --- old/qqc2-desktop-style-5.57.0/org.kde.desktop/private/MobileTextActionsToolBar.qml 2019-04-07 09:21:46.000000000 +0200 +++ new/qqc2-desktop-style-5.58.0/org.kde.desktop/private/MobileTextActionsToolBar.qml 2019-05-05 00:46:57.000000000 +0200 @@ -33,6 +33,7 @@ modal: false focus: false closePolicy: Popup.NoAutoClose + property bool shouldBeVisible: false x: controlRoot ? Math.min(Math.max(0, controlRoot.mapToItem(root.parent, controlRoot.positionToRectangle(controlRoot.selectionStart).x, 0).x - root.width/2), controlRoot.Window.contentItem.width - root.width) : 0 @@ -50,7 +51,7 @@ } - visible: controlRoot ? Kirigami.Settings.tabletMode && (controlRoot.selectedText.length > 0 || controlRoot.canPaste) : false + visible: controlRoot ? shouldBeVisible && Kirigami.Settings.tabletMode && (controlRoot.selectedText.length > 0 || controlRoot.canPaste) : false width: contentItem.implicitWidth + leftPadding + rightPadding @@ -58,7 +59,7 @@ ToolButton { focusPolicy: Qt.NoFocus icon.name: "edit-cut" - visible: controlRoot.selectedText.length > 0 + visible: controlRoot.selectedText.length > 0 && (!controlRoot.hasOwnProperty("echoMode") || controlRoot.echoMode === TextInput.Normal) onClicked: { controlRoot.cut(); } @@ -66,7 +67,7 @@ ToolButton { focusPolicy: Qt.NoFocus icon.name: "edit-copy" - visible: controlRoot.selectedText.length > 0 + visible: controlRoot.selectedText.length > 0 && (!controlRoot.hasOwnProperty("echoMode") || controlRoot.echoMode === TextInput.Normal) onClicked: { controlRoot.copy(); } @@ -74,6 +75,7 @@ ToolButton { focusPolicy: Qt.NoFocus icon.name: "edit-paste" + visible: controlRoot.canPaste onClicked: { controlRoot.paste(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qqc2-desktop-style-5.57.0/plugin/kquickstyleitem.cpp new/qqc2-desktop-style-5.58.0/plugin/kquickstyleitem.cpp --- old/qqc2-desktop-style-5.57.0/plugin/kquickstyleitem.cpp 2019-04-07 09:21:46.000000000 +0200 +++ new/qqc2-desktop-style-5.58.0/plugin/kquickstyleitem.cpp 2019-05-05 00:46:57.000000000 +0200 @@ -331,6 +331,17 @@ } else if (icon.canConvert<QString>()) { opt->icon = m_theme->iconFromTheme(icon.value<QString>(), m_properties[QStringLiteral("iconColor")].value<QColor>()); } + auto iconSize = QSize(m_properties[QStringLiteral("iconWidth")].toInt(), m_properties[QStringLiteral("iconHeight")].toInt()); + if (iconSize.isEmpty()) { + int e = KQuickStyleItem::style()->pixelMetric(QStyle::PM_ToolBarIconSize, m_styleoption, nullptr); + if (iconSize.width() <= 0) { + iconSize.setWidth(e); + } + if (iconSize.height() <= 0) { + iconSize.setHeight(e); + } + } + opt->iconSize = iconSize; if (m_properties.value(QStringLiteral("menu")).toBool()) { opt->subControls |= QStyle::SC_ToolButtonMenu; @@ -351,9 +362,6 @@ opt->toolButtonStyle = Qt::ToolButtonFollowStyle; } - int e = KQuickStyleItem::style()->pixelMetric(QStyle::PM_ToolBarIconSize, m_styleoption, nullptr); - opt->iconSize = QSize(e, e); - const QFont font = qApp->font("QToolButton"); opt->font = font; opt->fontMetrics = QFontMetrics(font);
participants (1)
-
root