Hello community,

here is the log from the commit of package qqc2-desktop-style for 
openSUSE:Factory checked in at 2019-10-14 13:40:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qqc2-desktop-style (Old)
 and      /work/SRC/openSUSE:Factory/.qqc2-desktop-style.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qqc2-desktop-style"

Mon Oct 14 13:40:33 2019 rev:27 rq:738071 version:5.63.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/qqc2-desktop-style/qqc2-desktop-style.changes    
2019-09-23 12:27:47.573704857 +0200
+++ 
/work/SRC/openSUSE:Factory/.qqc2-desktop-style.new.2352/qqc2-desktop-style.changes
  2019-10-14 13:40:34.649542050 +0200
@@ -1,0 +2,14 @@
+Sun Oct  6 13:27:07 UTC 2019 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.63.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.63.0.php
+- Changes since 5.62.0:
+  * Fix several build system errors
+  * Fix typo
+  * take margins from qstyle
+  * [QQC2 Desktop Style] Port away from deprecated methods in Qt 5.14
+  * [Tab] Fix sizing (kde#409390)
+
+-------------------------------------------------------------------

Old:
----
  qqc2-desktop-style-5.62.0.tar.xz
  qqc2-desktop-style-5.62.0.tar.xz.sig

New:
----
  qqc2-desktop-style-5.63.0.tar.xz
  qqc2-desktop-style-5.63.0.tar.xz.sig

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

Other differences:
------------------
++++++ qqc2-desktop-style.spec ++++++
--- /var/tmp/diff_new_pack.gnv5ia/_old  2019-10-14 13:40:35.505539819 +0200
+++ /var/tmp/diff_new_pack.gnv5ia/_new  2019-10-14 13:40:35.529539757 +0200
@@ -16,11 +16,11 @@
 #
 
 
-%define _tar_path 5.62
+%define _tar_path 5.63
 # Only needed for the package signature condition
 %bcond_without lang
 Name:           qqc2-desktop-style
-Version:        5.62.0
+Version:        5.63.0
 Release:        0
 Summary:        A Qt Quick Controls 2 Style for Desktop UIs
 License:        GPL-2.0-or-later


++++++ qqc2-desktop-style-5.62.0.tar.xz -> qqc2-desktop-style-5.63.0.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.62.0/CMakeLists.txt 
new/qqc2-desktop-style-5.63.0/CMakeLists.txt
--- old/qqc2-desktop-style-5.62.0/CMakeLists.txt        2019-09-07 
14:39:15.000000000 +0200
+++ new/qqc2-desktop-style-5.63.0/CMakeLists.txt        2019-10-06 
11:38:45.000000000 +0200
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.5)
 
-set(KF5_VERSION "5.62.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.62.0") # handled by release scripts
+set(KF5_VERSION "5.63.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.63.0") # handled by release scripts
 
 project(qqc2-desktop-style VERSION ${KF5_VERSION})
 
@@ -21,7 +21,7 @@
 
 ################# set KDE specific information #################
 
-find_package(ECM 5.62.0 REQUIRED NO_MODULE)
+find_package(ECM 5.63.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})
@@ -34,12 +34,11 @@
 
 find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Core 
Quick Gui Widgets QuickControls2)
 
-find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS Kirigami2)
+find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS Config Kirigami2)
 
-find_package(KF5 ${KF5_DEP_VERSION} COMPONENTS
-                IconThemes #KIconLoader
-                ConfigWidgets #KColorScheme
-            )
+# IconThemes and ConfigWidgets are optional
+find_package(KF5IconThemes ${KF5_DEP_VERSION})
+find_package(KF5ConfigWidgets ${KF5_DEP_VERSION})
 
 if (NOT APPLE AND NOT WIN32)
     find_package(X11)
@@ -88,6 +87,7 @@
 
 #########################################################################
 add_definitions(-DQT_NO_FOREACH)
+add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
 add_subdirectory(plugin)
 
 if (KF5IconThemes_FOUND AND KF5WidgetsAddons_FOUND)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qqc2-desktop-style-5.62.0/org.kde.desktop/ScrollView.qml 
new/qqc2-desktop-style-5.63.0/org.kde.desktop/ScrollView.qml
--- old/qqc2-desktop-style-5.62.0/org.kde.desktop/ScrollView.qml        
2019-09-07 14:39:15.000000000 +0200
+++ new/qqc2-desktop-style-5.63.0/org.kde.desktop/ScrollView.qml        
2019-10-06 11:38:45.000000000 +0200
@@ -39,10 +39,10 @@
     Kirigami.Theme.inherit: !background || !background.visible
 
     //size in pixel to accomodate the border drawn by qstyle
-    leftPadding: background && background.visible ? 2 : 0
-    topPadding: background && background.visible ? 2 : 0
-    rightPadding: background && background.visible ? 2 : 0
-    bottomPadding: background && background.visible ? 2 : 0
+    leftPadding: background && background.visible && 
background.hasOwnProperty("leftPadding") ? background.leftPadding : 0
+    topPadding: background && background.visible && 
background.hasOwnProperty("topPadding") ? background.topPadding : 0
+    rightPadding: background && background.visible && 
background.hasOwnProperty("rightPadding") ? background.rightPadding : 0
+    bottomPadding: background && background.visible && 
background.hasOwnProperty("bottomPadding") ? background.bottomPadding : 0
 
     //create a background only after Component.onCompleted, see on the 
component creation below for explanation
     Component.onCompleted: {
@@ -57,18 +57,34 @@
         },
         /*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
+        * ScrollView {background.visible: true} must *not* work, because 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
+                control: controlRoot.contentItem
                 elementType: "edit"
+                property int leftPadding: frame.leftPadding
+                property int topPadding: frame.topPadding
+                property int rightPadding: frame.rightPadding
+                property int bottomPadding: frame.bottomPadding
                 visible: false
                 sunken: true
+                raised: false
                 hasFocus: controlRoot.activeFocus || 
controlRoot.contentItem.activeFocus
                 hover: controlRoot.hovered
+                //This is just for the proper margin metrics
+                StylePrivate.StyleItem {
+                    id: frame
+                    anchors.fill:parent
+                    control: controlRoot
+                    elementType: "frame"
+                    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.62.0/plugin/CMakeLists.txt 
new/qqc2-desktop-style-5.63.0/plugin/CMakeLists.txt
--- old/qqc2-desktop-style-5.62.0/plugin/CMakeLists.txt 2019-09-07 
14:39:15.000000000 +0200
+++ new/qqc2-desktop-style-5.63.0/plugin/CMakeLists.txt 2019-10-06 
11:38:45.000000000 +0200
@@ -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::ConfigCore KF5::Kirigami2)
 
 if(KF5ConfigWidgets_FOUND)
     target_link_libraries(qqc2desktopstyleplugin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.62.0/plugin/kquickstyleitem.cpp 
new/qqc2-desktop-style-5.63.0/plugin/kquickstyleitem.cpp
--- old/qqc2-desktop-style-5.62.0/plugin/kquickstyleitem.cpp    2019-09-07 
14:39:15.000000000 +0200
+++ new/qqc2-desktop-style-5.63.0/plugin/kquickstyleitem.cpp    2019-10-06 
11:38:45.000000000 +0200
@@ -797,6 +797,54 @@
     }
 }
 
+int KQuickStyleItem::leftPadding() const
+{
+    switch (m_itemType) {
+    case Frame: {
+        const QRect cr = 
KQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, 
m_styleoption);
+        return cr.left() - m_styleoption->rect.left();
+    }
+    default:
+        return 0;
+    }
+}
+
+int KQuickStyleItem::topPadding() const
+{
+    switch (m_itemType) {
+    case Frame: {
+        const QRect cr = 
KQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, 
m_styleoption);
+        return cr.top() - m_styleoption->rect.top();
+    }
+    default:
+        return 0;
+    }
+}
+
+int KQuickStyleItem::rightPadding() const
+{
+    switch (m_itemType) {
+    case Frame: {
+        const QRect cr = 
KQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, 
m_styleoption);
+        return m_styleoption->rect.right() - cr.right();
+    }
+    default:
+        return 0;
+    }
+}
+
+int KQuickStyleItem::bottomPadding() const
+{
+    switch (m_itemType) {
+    case Frame: {
+        const QRect cr = 
KQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, 
m_styleoption);
+        return m_styleoption->rect.bottom() - cr.bottom();
+    }
+    default:
+        return 0;
+    }
+}
+
 /*
  *   Property style
  *
@@ -900,7 +948,7 @@
         }
         if (btn->toolButtonStyle != Qt::ToolButtonIconOnly) {
             QSize textSize = btn->fontMetrics.size(Qt::TextShowMnemonic, 
btn->text);
-            textSize.setWidth(textSize.width() + 
btn->fontMetrics.width(QLatin1Char(' '))*2);
+            textSize.setWidth(textSize.width() + 
btn->fontMetrics.horizontalAdvance(QLatin1Char(' '))*2);
             if (btn->toolButtonStyle == Qt::ToolButtonTextUnderIcon) {
                 h += 4 + textSize.height();
                 if (textSize.width() > w)
@@ -920,7 +968,7 @@
     case Button: {
         QStyleOptionButton *btn = 
qstyleoption_cast<QStyleOptionButton*>(m_styleoption);
 
-        int contentWidth = btn->fontMetrics.width(btn->text);
+        int contentWidth = btn->fontMetrics.boundingRect(btn->text).width();
         int contentHeight = btn->fontMetrics.height();
 
         if (!btn->icon.isNull()) {
@@ -935,13 +983,32 @@
         break;
     case ComboBox: {
         QStyleOptionComboBox *btn = 
qstyleoption_cast<QStyleOptionComboBox*>(m_styleoption);
-        int newWidth = qMax(width, btn->fontMetrics.width(btn->currentText));
+        int newWidth = qMax(width, 
btn->fontMetrics.boundingRect(btn->currentText).width());
         int newHeight = qMax(height, btn->fontMetrics.height());
         size = KQuickStyleItem::style()->sizeFromContents(QStyle::CT_ComboBox, 
m_styleoption, QSize(newWidth, newHeight)); }
         break;
-    case Tab:
-        size = 
KQuickStyleItem::style()->sizeFromContents(QStyle::CT_TabBarTab, m_styleoption, 
QSize(width,height));
+    case Tab: {
+        QStyleOptionTab *tab = 
qstyleoption_cast<QStyleOptionTab*>(m_styleoption);
+
+        int contentWidth = tab->fontMetrics.boundingRect(tab->text).width();
+        int contentHeight = tab->fontMetrics.height();
+
+        if (!tab->icon.isNull()) {
+            //+4 matches a hardcoded value in QStyle and acts as a margin 
between the icon and the text.
+            contentWidth += tab->iconSize.width() + 4;
+            contentHeight = qMax(contentHeight, tab->iconSize.height());
+        }
+
+        contentWidth += 
KQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabHSpace, tab);
+        contentHeight += 
KQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabVSpace, tab);
+
+        const int newWidth = qMax(width, contentWidth);
+        const int newHeight = qMax(height, contentHeight);
+
+        size = 
KQuickStyleItem::style()->sizeFromContents(QStyle::CT_TabBarTab, m_styleoption, 
QSize(newWidth, newHeight));
+
         break;
+    }
     case Slider:
         size = KQuickStyleItem::style()->sizeFromContents(QStyle::CT_Slider, 
m_styleoption, QSize(width,height));
         break;
@@ -971,7 +1038,7 @@
     case GroupBox: {
             QStyleOptionGroupBox *box = 
qstyleoption_cast<QStyleOptionGroupBox*>(m_styleoption);
             QFontMetrics metrics(box->fontMetrics);
-            int baseWidth = metrics.width(box->text) + 
metrics.width(QLatin1Char(' '));
+            int baseWidth = metrics.boundingRect(box->text + QLatin1Char(' 
')).width();
             int baseHeight = metrics.height() + m_contentHeight;
             if (box->subControls & QStyle::SC_GroupBoxCheckBox) {
                 baseWidth += 
KQuickStyleItem::style()->pixelMetric(QStyle::PM_IndicatorWidth);
@@ -1293,6 +1360,10 @@
     } else {
         m_itemType = Undefined;
     }
+    emit leftPaddingChanged();
+    emit rightPaddingChanged();
+    emit topPaddingChanged();
+    emit bottomPaddingChanged();
     updateSizeHint();
 }
 
@@ -1408,8 +1479,8 @@
     case ItemRow :{
         QPixmap pixmap;
         // Only draw through style once
-        const QString pmKey = QLatin1Literal("itemrow") % 
QString::number(m_styleoption->state,16) % activeControl();
-        if (!QPixmapCache::find(pmKey, pixmap) || pixmap.width() < width() || 
height() != pixmap.height()) {
+        const QString pmKey = QLatin1String("itemrow") % 
QString::number(m_styleoption->state,16) % activeControl();
+        if (!QPixmapCache::find(pmKey, &pixmap) || pixmap.width() < width() || 
height() != pixmap.height()) {
             int newSize = width();
             pixmap = QPixmap(newSize, height());
             pixmap.fill(Qt::transparent);
@@ -1446,6 +1517,8 @@
         }
         break;
     case Frame:
+        m_styleoption->state |= QStyle::State_Sunken;
+        m_styleoption->state &= ~QStyle::State_Raised;
         KQuickStyleItem::style()->drawControl(QStyle::CE_ShapedFrame, 
m_styleoption, painter);
         break;
     case FocusFrame:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qqc2-desktop-style-5.62.0/plugin/kquickstyleitem_p.h 
new/qqc2-desktop-style-5.63.0/plugin/kquickstyleitem_p.h
--- old/qqc2-desktop-style-5.62.0/plugin/kquickstyleitem_p.h    2019-09-07 
14:39:15.000000000 +0200
+++ new/qqc2-desktop-style-5.63.0/plugin/kquickstyleitem_p.h    2019-10-06 
11:38:45.000000000 +0200
@@ -101,6 +101,11 @@
     Q_PROPERTY( int textureWidth READ textureWidth WRITE setTextureWidth 
NOTIFY textureWidthChanged)
     Q_PROPERTY( int textureHeight READ textureHeight WRITE setTextureHeight 
NOTIFY textureHeightChanged)
 
+    Q_PROPERTY( int leftPadding READ leftPadding NOTIFY leftPaddingChanged)
+    Q_PROPERTY( int topPadding READ topPadding NOTIFY topPaddingChanged)
+    Q_PROPERTY( int rightPadding READ rightPadding NOTIFY rightPaddingChanged)
+    Q_PROPERTY( int bottomPadding READ bottomPadding NOTIFY 
bottomPaddingChanged)
+
     Q_PROPERTY( QQuickItem *control READ control WRITE setControl NOTIFY 
controlChanged)
 
     KQuickPadding* border() { return &m_border; }
@@ -208,6 +213,11 @@
     virtual void initStyleOption ();
     void resolvePalette();
 
+    int leftPadding() const;
+    int topPadding() const;
+    int rightPadding() const;
+    int bottomPadding() const;
+
     Q_INVOKABLE qreal textWidth(const QString &);
     Q_INVOKABLE qreal textHeight(const QString &);
 
@@ -265,6 +275,11 @@
     void textureWidthChanged(int w);
     void textureHeightChanged(int h);
 
+    void leftPaddingChanged();
+    void topPaddingChanged();
+    void rightPaddingChanged();
+    void bottomPaddingChanged();
+
 protected:
     bool event(QEvent *) override;
     QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;


Reply via email to