Hello community, here is the log from the commit of package kirigami2 for openSUSE:Factory checked in at 2019-07-26 12:15:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kirigami2 (Old) and /work/SRC/openSUSE:Factory/.kirigami2.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kirigami2" Fri Jul 26 12:15:58 2019 rev:29 rq:715888 version:5.60.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kirigami2/kirigami2.changes 2019-06-22 11:12:25.900606292 +0200 +++ /work/SRC/openSUSE:Factory/.kirigami2.new.4126/kirigami2.changes 2019-07-26 12:16:06.810794575 +0200 @@ -1,0 +2,25 @@ +Sun Jul 14 06:41:38 UTC 2019 - lbeltrame@kde.org + +- Update to 5.60.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.60.0.php +- Changes since 5.59.0: + * [ActionTextField] Make action glow on press + * Remove ifdef for Qt 5.11 since that is now the required version + * support text mode and position + * mouseover effect for breadcrumb on desktop + * Fix typo in documentation + * enforce a minimum height of 2 gridunits + * Set SwipeListItem implicitHeight to be the maximum of content and actions + * Hide tooltip when PrivateActionToolButton is pressed + * Remove accidentally slipped back traces of cmake code for Plasma style + * ColumnView::itemAt + * force breeze-internal if no theme is speacified + * correct navigation on left pinned page + * keep track of the space covered by pinned pages + * show a separator when in left sidebar mode + * in single column mode, pin has no effect + * first semi working prototype of pinning + +------------------------------------------------------------------- Old: ---- kirigami2-5.59.0.tar.xz New: ---- kirigami2-5.60.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kirigami2.spec ++++++ --- /var/tmp/diff_new_pack.7tDHKC/_old 2019-07-26 12:16:07.606794427 +0200 +++ /var/tmp/diff_new_pack.7tDHKC/_new 2019-07-26 12:16:07.606794427 +0200 @@ -17,14 +17,14 @@ %define lname libKF5Kirigami2-5 -%define _tar_path 5.59 +%define _tar_path 5.60 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} %bcond_without lang Name: kirigami2 -Version: 5.59.0 +Version: 5.60.0 Release: 0 Summary: Set of QtQuick components License: LGPL-2.1-or-later ++++++ kirigami2-5.59.0.tar.xz -> kirigami2-5.60.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/CMakeLists.txt new/kirigami2-5.60.0/CMakeLists.txt --- old/kirigami2-5.59.0/CMakeLists.txt 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/CMakeLists.txt 2019-07-07 20:35:19.000000000 +0200 @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.59.0") # handled by release scripts -set(KF5_DEP_VERSION "5.59.0") # handled by release scripts +set(KF5_VERSION "5.60.0") # handled by release scripts +set(KF5_DEP_VERSION "5.60.0") # handled by release scripts project(kirigami2 VERSION ${KF5_VERSION}) -set(REQUIRED_QT_VERSION 5.10.0) +set(REQUIRED_QT_VERSION 5.11.0) SET(CMAKE_CXX_STANDARD 11) @@ -52,7 +52,7 @@ ################# set KDE specific information ################# -find_package(ECM 5.59.0 NO_MODULE) +find_package(ECM 5.60.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/po/ca@valencia/libkirigami2plugin_qt.po new/kirigami2-5.60.0/po/ca@valencia/libkirigami2plugin_qt.po --- old/kirigami2-5.59.0/po/ca@valencia/libkirigami2plugin_qt.po 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/po/ca@valencia/libkirigami2plugin_qt.po 2019-07-07 20:35:19.000000000 +0200 @@ -5,26 +5,29 @@ # # Antoni Bella Pérez <antonibella5@yahoo.com>, 2016. # Josep Ma. Ferrer <txemaq@gmail.com>, 2017, 2018, 2019. +# Empar <montoro_mde@gva.es>, 2019. msgid "" msgstr "" "Project-Id-Version: libkirigami2plugin_qt\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" -"PO-Revision-Date: 2019-03-20 20:45+0100\n" -"Last-Translator: Josep Ma. Ferrer <txemaq@gmail.com>\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2019-06-18 07:59+0200\n" +"Last-Translator: Empar <montoro_mde@gva.es>\n" "Language-Team: Catalan <kde-i18n-ca@kde.org>\n" "Language: ca@valencia\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Qt-Contexts: true\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Accelerator-Marker: &\n" -"X-Generator: Lokalize 2.0\n" +"X-Generator: Poedit 2.0.6\n" +"X-Qt-Contexts: true\n" +"X-Project-Style: kde\n" #: controls/AboutPage.qml:79 msgctxt "AboutPage|" msgid "About" -msgstr "Quant al " +msgstr "Quant a" #: controls/AboutPage.qml:107 #, qt-format @@ -35,7 +38,7 @@ #: controls/AboutPage.qml:142 msgctxt "AboutPage|" msgid "Copyright" -msgstr "Drets d'autor" +msgstr "Drets d'autoria" #: controls/AboutPage.qml:164 msgctxt "AboutPage|" @@ -50,7 +53,7 @@ #: controls/AboutPage.qml:186 msgctxt "AboutPage|" msgid "Authors" -msgstr "Autors" +msgstr "Autoria" #: controls/AboutPage.qml:195 msgctxt "AboutPage|" @@ -60,7 +63,7 @@ #: controls/AboutPage.qml:204 msgctxt "AboutPage|" msgid "Translators" -msgstr "Traductors" +msgstr "Equip de traducció" #: controls/ContextDrawer.qml:78 msgctxt "ContextDrawer|" @@ -85,17 +88,17 @@ #: controls/SearchField.qml:44 msgctxt "SearchField|" msgid "Search..." -msgstr "Cerca..." +msgstr "Busca..." #: controls/templates/private/BackButton.qml:47 msgctxt "BackButton|" msgid "Navigate Back" -msgstr "Navega arrere" +msgstr "Navega endarrere" #: controls/templates/private/ForwardButton.qml:43 msgctxt "ForwardButton|" msgid "Navigate Forward" -msgstr "Navega avant" +msgstr "Navega endavant" #: controls/ToolBarApplicationHeader.qml:126 msgctxt "ToolBarApplicationHeader|" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/po/sk/libkirigami2plugin_qt.po new/kirigami2-5.60.0/po/sk/libkirigami2plugin_qt.po --- old/kirigami2-5.59.0/po/sk/libkirigami2plugin_qt.po 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/po/sk/libkirigami2plugin_qt.po 2019-07-07 20:35:19.000000000 +0200 @@ -1,19 +1,20 @@ # translation of libkirigamiplugin_qt.po to Slovak # Roman Paholik <wizzardsk@gmail.com>, 2016. # Mthw <jari_45@hotmail.com>, 2019. +# Matej Mrenica <matejm98mthw@gmail.com>, 2019. msgid "" msgstr "" "Project-Id-Version: libkirigamiplugin_qt\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2016-08-05 07:24+0000\n" -"PO-Revision-Date: 2019-01-28 12:27+0100\n" -"Last-Translator: Mthw <jari_45@hotmail.com>\n" +"PO-Revision-Date: 2019-07-05 10:40+0200\n" +"Last-Translator: Matej Mrenica <matejm98mthw@gmail.com>\n" "Language-Team: Slovak <kde-sk@linux.sk>\n" "Language: sk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 18.12.1\n" +"X-Generator: Lokalize 19.04.2\n" "X-Qt-Contexts: true\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" @@ -49,7 +50,6 @@ msgstr "Autori" #: controls/AboutPage.qml:195 -#, fuzzy msgctxt "AboutPage|" msgid "Credits" msgstr "Zásluhy" @@ -72,7 +72,7 @@ #: controls/PasswordField.qml:45 msgctxt "PasswordField|" msgid "Password" -msgstr "" +msgstr "Heslo" #: controls/private/globaltoolbar/ToolBarPageHeader.qml:107 msgctxt "ToolBarPageHeader|" @@ -82,7 +82,7 @@ #: controls/SearchField.qml:44 msgctxt "SearchField|" msgid "Search..." -msgstr "" +msgstr "Hľadať..." #: controls/templates/private/BackButton.qml:47 msgctxt "BackButton|" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/po/zh_CN/libkirigami2plugin_qt.po new/kirigami2-5.60.0/po/zh_CN/libkirigami2plugin_qt.po --- old/kirigami2-5.59.0/po/zh_CN/libkirigami2plugin_qt.po 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/po/zh_CN/libkirigami2plugin_qt.po 2019-07-07 20:35:19.000000000 +0200 @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: kdeorg\n" -"PO-Revision-Date: 2019-05-05 22:21\n" +"PO-Revision-Date: 2019-06-02 11:52\n" "Last-Translator: Guo Yunhe (guoyunhe)\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/CMakeLists.txt new/kirigami2-5.60.0/src/CMakeLists.txt --- old/kirigami2-5.59.0/src/CMakeLists.txt 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/CMakeLists.txt 2019-07-07 20:35:19.000000000 +0200 @@ -88,15 +88,9 @@ install(DIRECTORY controls/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami.2) - if (PLASMA_ENABLED) - install(DIRECTORY styles/Plasma DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami.2/styles) - endif() if (DESKTOP_ENABLED) install(DIRECTORY styles/org.kde.desktop DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami.2/styles) endif() - if (PLASMA_ENABLED AND DESKTOP_ENABLED) - install(DIRECTORY styles/org.kde.desktop.plasma DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami.2/styles) - endif() install(DIRECTORY styles/Material DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami.2/styles) install(FILES ${platformspecific} DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami.2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/columnview.cpp new/kirigami2-5.60.0/src/columnview.cpp --- old/kirigami2-5.59.0/src/columnview.cpp 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/columnview.cpp 2019-07-07 20:35:19.000000000 +0200 @@ -66,6 +66,12 @@ "visible: column.Kirigami.ColumnView.view.contentX < column.x;" "anchors.top: column.top;" "anchors.bottom: column.bottom;" + "}\n" + "readonly property Component rightSeparator: Kirigami.Separator {" + "property Item column\n" + "anchors.top: column.top;" + "anchors.right: column.right;" + "anchors.bottom: column.bottom;" "}" "}"), QUrl()); @@ -76,6 +82,9 @@ m_separatorComponent = m_instance->property("separator").value<QQmlComponent *>(); Q_ASSERT(m_separatorComponent); + m_rightSeparatorComponent = m_instance->property("rightSeparator").value<QQmlComponent *>(); + Q_ASSERT(m_rightSeparatorComponent); + m_units = m_instance->property("units").value<QObject *>(); Q_ASSERT(m_units); @@ -132,6 +141,10 @@ m_fillWidth = fill; emit fillWidthChanged(); + + if (m_view) { + m_view->polish(); + } } bool ColumnViewAttached::fillWidth() const @@ -157,6 +170,10 @@ m_reservedSpace = space; emit reservedSpaceChanged(); + + if (m_view) { + m_view->polish(); + } } ColumnView *ColumnViewAttached::view() @@ -228,6 +245,26 @@ emit preventStealingChanged(); } +bool ColumnViewAttached::isPinned() const +{ + return m_pinned; +} + +void ColumnViewAttached::setPinned(bool pinned) +{ + if (pinned == m_pinned) { + return; + } + + m_pinned = pinned; + + emit pinnedChanged(); + + if (m_view) { + m_view->polish(); + } +} + ///////// @@ -252,6 +289,8 @@ } } }); + + connect(this, &QQuickItem::xChanged, this, &ContentItem::layoutPinnedItems); } ContentItem::~ContentItem() @@ -282,29 +321,39 @@ void ContentItem::snapToItem() { - QQuickItem *firstItem = childAt(-x(), 0); + QQuickItem *firstItem = childAt(viewportLeft(), 0); if (!firstItem) { return; } QQuickItem *nextItem = childAt(firstItem->x() + firstItem->width() + 1, 0); //need to make the last item visible? - if (nextItem && width() - (-x() + m_view->width()) < -x() - firstItem->x()) { + if (nextItem && width() - (viewportRight()) < viewportLeft() - firstItem->x()) { m_viewAnchorItem = nextItem; - animateX(-nextItem->x()); + animateX(-nextItem->x() + m_leftPinnedSpace); //The first one found? - } else if (-x() <= firstItem->x() + firstItem->width()/2 || !nextItem) { + } else if (viewportLeft() <= firstItem->x() + firstItem->width()/2 || !nextItem) { m_viewAnchorItem = firstItem; - animateX(-firstItem->x()); + animateX(-firstItem->x() + m_leftPinnedSpace); //the second? } else { m_viewAnchorItem = nextItem; - animateX(-nextItem->x()); + animateX(-nextItem->x() + m_leftPinnedSpace); } } +qreal ContentItem::viewportLeft() const +{ + return -x() + m_leftPinnedSpace; +} + +qreal ContentItem::viewportRight() const +{ + return -x() + m_view->width() - m_rightPinnedSpace; +} + qreal ContentItem::childWidth(QQuickItem *child) { if (!parentItem()) { @@ -344,13 +393,48 @@ qreal implicitHeight = 0; qreal partialWidth = 0; int i = 0; + m_leftPinnedSpace = 0; + m_rightPinnedSpace = 0; for (QQuickItem *child : m_items) { + ColumnViewAttached *attached = qobject_cast<ColumnViewAttached *>(qmlAttachedPropertiesObject<ColumnView>(child, true)); + if (child->isVisible()) { - child->setSize(QSizeF(childWidth(child), height())); - child->setPosition(QPointF(partialWidth, 0.0)); - partialWidth += child->width(); + if (attached->isPinned() && m_view->columnResizeMode() != ColumnView::SingleColumn) { + QQuickItem *sep = nullptr; + int sepWidth = 0; + if (m_view->separatorVisible()) { + sep = ensureRightSeparator(child); + sepWidth = (sep ? sep->width() : 0); + } + const qreal width = childWidth(child); + child->setSize(QSizeF(width + sepWidth, height())); + + child->setPosition(QPointF(qMin(qMax(-x(), partialWidth), -x() + m_view->width() - child->width() + sepWidth), 0.0)); + child->setZ(1); + + if (partialWidth <= -x()) { + m_leftPinnedSpace = qMax(m_leftPinnedSpace, width); + } else if (partialWidth > -x() + m_view->width() - child->width() + sepWidth) { + m_rightPinnedSpace = qMax(m_rightPinnedSpace, child->width()); + } + + partialWidth += width; + + } else { + child->setSize(QSizeF(childWidth(child), height())); + + auto it = m_rightSeparators.find(child); + if (it != m_rightSeparators.end()) { + it.value()->deleteLater(); + m_rightSeparators.erase(it); + } + child->setPosition(QPointF(partialWidth, 0.0)); + child->setZ(0); + + partialWidth += child->width(); + } } - ColumnViewAttached *attached = qobject_cast<ColumnViewAttached *>(qmlAttachedPropertiesObject<ColumnView>(child, true)); + attached->setIndex(i++); implicitWidth += child->implicitWidth(); @@ -376,6 +460,42 @@ updateVisibleItems(); } +void ContentItem::layoutPinnedItems() +{ + if (m_view->columnResizeMode() == ColumnView::SingleColumn) { + return; + } + + qreal partialWidth = 0; + m_leftPinnedSpace = 0; + m_rightPinnedSpace = 0; + + for (QQuickItem *child : m_items) { + ColumnViewAttached *attached = qobject_cast<ColumnViewAttached *>(qmlAttachedPropertiesObject<ColumnView>(child, true)); + + if (child->isVisible()) { + if (attached->isPinned()) { + QQuickItem *sep = nullptr; + int sepWidth = 0; + if (m_view->separatorVisible()) { + sep = ensureRightSeparator(child); + sepWidth = (sep ? sep->width() : 0); + } + + child->setPosition(QPointF(qMin(qMax(-x(), partialWidth), -x() + m_view->width() - child->width() + sepWidth), 0.0)); + + if (partialWidth <= -x()) { + m_leftPinnedSpace = qMax(m_leftPinnedSpace, child->width() - sepWidth); + } else if (partialWidth > -x() + m_view->width() - child->width() + sepWidth) { + m_rightPinnedSpace = qMax(m_rightPinnedSpace, child->width()); + } + } + + partialWidth += child->width(); + } + } +} + void ContentItem::updateVisibleItems() { QList <QObject *> newItems; @@ -419,6 +539,10 @@ if (separatorItem) { separatorItem->deleteLater(); } + separatorItem = m_rightSeparators.take(item); + if (separatorItem) { + separatorItem->deleteLater(); + } const int index = m_items.indexOf(item); m_items.removeAll(item); @@ -451,6 +575,24 @@ return separatorItem; } +QQuickItem *ContentItem::ensureRightSeparator(QQuickItem *item) +{ + QQuickItem *separatorItem = m_rightSeparators.value(item); + + if (!separatorItem) { + separatorItem = qobject_cast<QQuickItem *>(privateQmlComponentsPoolSelf->self.m_rightSeparatorComponent->beginCreate(QQmlEngine::contextForObject(item))); + if (separatorItem) { + separatorItem->setParentItem(item); + separatorItem->setZ(9999); + separatorItem->setProperty("column", QVariant::fromValue(item)); + privateQmlComponentsPoolSelf->self.m_rightSeparatorComponent->completeCreate(); + m_rightSeparators[item] = separatorItem; + } + } + + return separatorItem; +} + void ContentItem::itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value) { switch (change) { @@ -647,15 +789,20 @@ //m_contentItem->m_slideAnim->stop(); - QRectF contentsRect(QPointF(0, 0), size()); + QRectF contentsRect(m_contentItem->m_leftPinnedSpace, + 0, + width() - m_contentItem->m_rightPinnedSpace - m_contentItem->m_leftPinnedSpace, + height()); m_contentItem->m_shouldAnimate = true; - if (!contentsRect.contains(mappedCurrent)) { - m_contentItem->m_viewAnchorItem = m_currentItem; - m_contentItem->animateX(-m_currentItem->x()); - } else { - m_contentItem->snapToItem(); + if (!m_mouseDown) { + if (!contentsRect.contains(mappedCurrent)) { + m_contentItem->m_viewAnchorItem = m_currentItem; + m_contentItem->animateX(-m_currentItem->x() + m_contentItem->m_leftPinnedSpace); + } else { + m_contentItem->snapToItem(); + } } } @@ -770,11 +917,23 @@ if (sep) { sep->setVisible(true); } + + ColumnViewAttached *attached = qobject_cast<ColumnViewAttached *>(qmlAttachedPropertiesObject<ColumnView>(item, true)); + if (attached->isPinned()) { + QQuickItem *sep = m_contentItem->ensureRightSeparator(item); + if (sep) { + sep->setVisible(true); + } + } } + } else { for (QQuickItem *sep : m_contentItem->m_separators.values()) { sep->setVisible(false); } + for (QQuickItem *sep : m_contentItem->m_rightSeparators.values()) { + sep->setVisible(false); + } } emit separatorVisibleChanged(); @@ -974,6 +1133,11 @@ return m_contentItem->m_items.contains(item); } +QQuickItem *ColumnView::itemAt(qreal x, qreal y) +{ + return m_contentItem->childAt(x, y); +} + ColumnViewAttached *ColumnView::qmlAttachedProperties(QObject *object) { return new ColumnViewAttached(object); @@ -1011,6 +1175,7 @@ } m_oldMouseX = m_startMouseX = mapFromItem(item, me->localPos()).x(); + m_mouseDown = true; me->setAccepted(false); setKeepMouseGrab(false); @@ -1022,7 +1187,6 @@ if (candidateItem->parentItem() == m_contentItem) { setCurrentIndex(m_contentItem->m_items.indexOf(candidateItem)); } - break; } case QEvent::MouseMove: { @@ -1088,6 +1252,8 @@ return false; } + m_mouseDown = false; + m_contentItem->snapToItem(); if (m_dragging) { m_dragging = false; @@ -1129,6 +1295,7 @@ m_contentItem->snapToItem(); m_oldMouseX = event->localPos().x(); m_startMouseX = event->localPos().x(); + m_mouseDown = true; setKeepMouseGrab(false); event->accept(); } @@ -1175,6 +1342,8 @@ return; } + m_mouseDown = false; + if (!m_interactive) { return; } @@ -1196,6 +1365,8 @@ emit draggingChanged(); } + m_mouseDown = false; + if (m_contentItem->m_slideAnim->state() != QAbstractAnimation::Running) { m_contentItem->snapToItem(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/columnview.h new/kirigami2-5.60.0/src/columnview.h --- old/kirigami2-5.59.0/src/columnview.h 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/columnview.h 2019-07-07 20:35:19.000000000 +0200 @@ -58,6 +58,12 @@ Q_PROPERTY(bool preventStealing READ preventStealing WRITE setPreventStealing NOTIFY preventStealingChanged) /** + * If true the page will never go out of view, but will stay either + * at the right or left side of the Columnview + */ + Q_PROPERTY(bool pinned READ isPinned WRITE setPinned NOTIFY pinnedChanged) + + /** * The view this column belongs to */ Q_PROPERTY(ColumnView *view READ view NOTIFY viewChanged) @@ -88,12 +94,16 @@ bool preventStealing() const; void setPreventStealing(bool prevent); + bool isPinned() const; + void setPinned(bool pinned); + Q_SIGNALS: void indexChanged(); void fillWidthChanged(); void reservedSpaceChanged(); void viewChanged(); void preventStealingChanged(); + void pinnedChanged(); private: int m_index = -1; @@ -105,6 +115,7 @@ bool m_customReservedSpace = false; bool m_shouldDeleteOnRemove = true; bool m_preventStealing = false; + bool m_pinned = false; }; @@ -348,6 +359,12 @@ */ bool containsItem(QQuickItem *item); + /** + * Returns the visible item containing the point x, y in content coordinates. + * If there is no item at the point specified, or the item is not visible null is returned. + */ + QQuickItem *itemAt(qreal x, qreal y); + protected: void classBegin() override; void componentComplete() override; @@ -418,6 +435,7 @@ qreal m_topPadding = 0; qreal m_bottomPadding = 0; + bool m_mouseDown = false; bool m_interactive = true; bool m_dragging = false; bool m_moving = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/columnview_p.h new/kirigami2-5.60.0/src/columnview_p.h --- old/kirigami2-5.59.0/src/columnview_p.h 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/columnview_p.h 2019-07-07 20:35:19.000000000 +0200 @@ -38,6 +38,7 @@ void initialize(QQmlEngine *engine); QQmlComponent *m_separatorComponent = nullptr; + QQmlComponent *m_rightSeparatorComponent = nullptr; QObject *m_units = nullptr; Q_SIGNALS: @@ -57,15 +58,20 @@ ~ContentItem(); void layoutItems(); + void layoutPinnedItems(); qreal childWidth(QQuickItem *child); void updateVisibleItems(); void forgetItem(QQuickItem *item); QQuickItem *ensureSeparator(QQuickItem *item); + QQuickItem *ensureRightSeparator(QQuickItem *item); void setBoundedX(qreal x); void animateX(qreal x); void snapToItem(); + inline qreal viewportLeft() const; + inline qreal viewportRight() const; + protected: void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value) override; void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override; @@ -81,8 +87,12 @@ QList<QObject *> m_visibleItems; QPointer<QQuickItem> m_viewAnchorItem; QHash<QQuickItem *, QQuickItem *> m_separators; + QHash<QQuickItem *, QQuickItem *> m_rightSeparators; QHash<QObject *, QObject*> m_models; + qreal m_leftPinnedSpace = 361; + qreal m_rightPinnedSpace = 0; + qreal m_columnWidth = 0; ColumnView::ColumnResizeMode m_columnResizeMode = ColumnView::FixedColumns; bool m_shouldAnimate = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/controls/ActionTextField.qml new/kirigami2-5.60.0/src/controls/ActionTextField.qml --- old/kirigami2-5.59.0/src/controls/ActionTextField.qml 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/controls/ActionTextField.qml 2019-07-07 20:35:19.000000000 +0200 @@ -137,8 +137,10 @@ anchors.verticalCenter: parent.verticalCenter source: modelData.icon.name.length > 0 ? modelData.icon.name : modelData.icon.source + active: actionArea.containsPress visible: modelData.visible MouseArea { + id: actionArea anchors.fill: parent onClicked: modelData.trigger() cursorShape: Qt.PointingHandCursor diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/controls/ActionToolBar.qml new/kirigami2-5.60.0/src/controls/ActionToolBar.qml --- old/kirigami2-5.59.0/src/controls/ActionToolBar.qml 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/controls/ActionToolBar.qml 2019-07-07 20:35:19.000000000 +0200 @@ -19,7 +19,7 @@ import QtQuick 2.6 import QtQuick.Layouts 1.2 -import QtQuick.Controls 2.0 as Controls +import QtQuick.Controls 2.2 as Controls import org.kde.kirigami 2.5 as Kirigami import "private" @@ -55,6 +55,30 @@ */ property bool flat: true + /** + * display: enum + * This controls the label position regarding the icon, is the same value to control individual Button components, + * permitted values are: + * * Button.IconOnly + * * Button.TextOnly + * * Button.TextBesideIcon + * * Button.TextUnderIcon + */ + property int display: Controls.Button.TextBesideIcon + + /** + * position enum + * This property holds the position of the toolbar. + * if this ActionToolBar is the contentItem of a QQC2 Toolbar, the position is binded to the ToolBar's position + * + * permitted values are: + * *ToolBar.Header: The toolbar is at the top, as a window or page header. + * *ToolBar.Footer: The toolbar is at the bottom, as a window or page footer. + */ + property int position: parent && parent.hasOwnProperty("position") + ? parent.position + : Controls.ToolBar.Footer + implicitHeight: actionsLayout.implicitHeight implicitWidth: { @@ -104,8 +128,9 @@ return minX + implicitWidth < actionsLayout.width - moreButton.width } + display: root.display visible: modelData.visible && fits - Layout.fillWidth: true + Layout.fillWidth: false Layout.alignment: Qt.AlignVCenter Layout.minimumWidth: implicitWidth kirigamiAction: modelData @@ -130,14 +155,20 @@ } } } + + Item { + Layout.fillWidth: true + } + Controls.ToolButton { id: moreButton Layout.alignment: Qt.AlignRight Kirigami.Icon { - anchors.fill: parent + anchors.centerIn: parent source: "overflow-menu" - anchors.margins: 4 + width: Kirigami.Units.iconSizes.smallMedium + height: width } //checkable: true @@ -147,7 +178,7 @@ ActionsMenu { id: menu - y: -height + y: root.position == Controls.ToolBar.Footer ? -height : moreButton.height x: -width + moreButton.width actions: root.actions submenuComponent: Component { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/controls/ApplicationItem.qml new/kirigami2-5.60.0/src/controls/ApplicationItem.qml --- old/kirigami2-5.59.0/src/controls/ApplicationItem.qml 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/controls/ApplicationItem.qml 2019-07-07 20:35:19.000000000 +0200 @@ -31,8 +31,8 @@ * It's based around the PageRow component, the application will be * about pages adding and removal. * For most of the usages, this class should be used instead - * of AbstractApplicationWidnow - * @see AbstractApplicationWidnow + * of AbstractApplicationWindow + * @see AbstractApplicationWindow * * Example usage: * @code diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/controls/private/PrivateActionToolButton.qml new/kirigami2-5.60.0/src/controls/private/PrivateActionToolButton.qml --- old/kirigami2-5.59.0/src/controls/private/PrivateActionToolButton.qml 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/controls/private/PrivateActionToolButton.qml 2019-07-07 20:35:19.000000000 +0200 @@ -19,7 +19,7 @@ import QtQuick 2.6 import QtQuick.Layouts 1.2 -import QtQuick.Controls 2.0 as Controls +import QtQuick.Controls 2.2 as Controls import org.kde.kirigami 2.4 Controls.ToolButton { @@ -76,16 +76,19 @@ onPressed: mouse.accepted = false Theme.colorSet: checked && (control.kirigamiAction && control.kirigamiAction.icon.color.a) ? Theme.Selection : control.Theme.colorSet Theme.inherit: control.kirigamiAction && Theme.colorSet != Theme.Selection && control.kirigamiAction.icon.color.a === 0 - RowLayout { + GridLayout { id: layout + columns: control.display == Controls.ToolButton.TextUnderIcon ? 1 : 2 + (menuArrow.visible ? 1 : 0) + rows: control.display == Controls.ToolButton.TextUnderIcon ? 2 : 1 anchors.centerIn: parent Icon { id: mainIcon + Layout.alignment: Qt.AlignCenter Layout.minimumWidth: Units.iconSizes.smallMedium Layout.minimumHeight: Units.iconSizes.smallMedium source: control.kirigamiAction ? (control.kirigamiAction.icon ? control.kirigamiAction.icon.name : control.kirigamiAction.iconName) : "" - visible: control.kirigamiAction && control.kirigamiAction.iconName != "" + visible: control.kirigamiAction && control.kirigamiAction.iconName != "" && control.display != Controls.ToolButton.TextOnly color: control.flat && control.kirigamiAction && control.kirigamiAction.icon && control.kirigamiAction.icon.color.a > 0 ? control.kirigamiAction.icon.color : label.color } Controls.Label { @@ -95,7 +98,7 @@ MnemonicData.label: control.kirigamiAction ? control.kirigamiAction.text : "" text: MnemonicData.richTextLabel - visible: control.showText && text.length > 0 + visible: control.showText && text.length > 0 && control.display != Controls.ToolButton.IconOnly Shortcut { sequence: label.MnemonicData.sequence @@ -113,7 +116,7 @@ } } Controls.ToolTip { - visible: control.hovered && text.length > 0 && !menu.visible + visible: control.hovered && text.length > 0 && !menu.visible && !control.pressed text: kirigamiAction ? (kirigamiAction.tooltip.length ? kirigamiAction.tooltip : kirigamiAction.text) : "" delay: 1000 timeout: 5000 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/controls/private/globaltoolbar/BreadcrumbControl.qml new/kirigami2-5.60.0/src/controls/private/globaltoolbar/BreadcrumbControl.qml --- old/kirigami2-5.59.0/src/controls/private/globaltoolbar/BreadcrumbControl.qml 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/controls/private/globaltoolbar/BreadcrumbControl.qml 2019-07-07 20:35:19.000000000 +0200 @@ -57,6 +57,13 @@ Layout.preferredWidth: delegateLayout.implicitWidth Layout.fillHeight: true onClicked: pageRow.currentIndex = modelData; + hoverEnabled: !Kirigami.Settings.tabletMode + Rectangle { + color: Kirigami.Theme.highlightColor + anchors.fill: parent + radius: 3 + opacity: parent.containsMouse ? 0.1 : 0 + } RowLayout { id: delegateLayout anchors.fill: parent diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/controls/templates/SwipeListItem.qml new/kirigami2-5.60.0/src/controls/templates/SwipeListItem.qml --- old/kirigami2-5.59.0/src/controls/templates/SwipeListItem.qml 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/controls/templates/SwipeListItem.qml 2019-07-07 20:35:19.000000000 +0200 @@ -20,7 +20,7 @@ import QtQuick 2.7 import QtQuick.Layouts 1.2 import QtQuick.Controls 2.0 as Controls -import org.kde.kirigami 2.4 +import org.kde.kirigami 2.7 import "../private" import QtQuick.Templates 2.0 as T2 @@ -159,7 +159,7 @@ hoverEnabled: true implicitWidth: contentItem ? contentItem.implicitWidth : Units.gridUnit * 12 width: parent ? parent.width : implicitWidth - implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding + implicitHeight: Math.max(Units.gridUnit * 2, contentItem.implicitHeight, actionsLayout.implicitHeight) + topPadding + bottomPadding padding: Settings.tabletMode ? Units.largeSpacing : Units.smallSpacing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/delegaterecycler.cpp new/kirigami2-5.60.0/src/delegaterecycler.cpp --- old/kirigami2-5.59.0/src/delegaterecycler.cpp 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/delegaterecycler.cpp 2019-07-07 20:35:19.000000000 +0200 @@ -289,16 +289,10 @@ syncModel(); QQmlContext *ctx = QQmlEngine::contextForObject(m_item)->parentContext(); -#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0) - ctx->setContextProperty(QStringLiteral("modelData"), m_propertiesTracker->property("trackedModelData")); - ctx->setContextProperty(QStringLiteral("index"), m_propertiesTracker->property("trackedIndex")); - ctx->setContextProperty(QStringLiteral("delegateRecycler"), QVariant::fromValue<QObject*>(this)); -#else ctx->setContextProperties({ QQmlContext::PropertyPair{ QStringLiteral("modelData"), m_propertiesTracker->property("trackedModelData") }, QQmlContext::PropertyPair{ QStringLiteral("index"), m_propertiesTracker->property("trackedIndex")}, QQmlContext::PropertyPair{ QStringLiteral("delegateRecycler"), QVariant::fromValue<QObject*>(this) } }); -#endif } if (m_item) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kirigami2-5.59.0/src/kirigamiplugin.cpp new/kirigami2-5.60.0/src/kirigamiplugin.cpp --- old/kirigami2-5.59.0/src/kirigamiplugin.cpp 2019-06-01 18:57:36.000000000 +0200 +++ new/kirigami2-5.60.0/src/kirigamiplugin.cpp 2019-07-07 20:35:19.000000000 +0200 @@ -69,7 +69,7 @@ Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.kirigami")); const QString style = QQuickStyle::name(); - if (!qEnvironmentVariableIsSet("XDG_CURRENT_DESKTOP")) { + if (QIcon::themeName().isEmpty() && !qEnvironmentVariableIsSet("XDG_CURRENT_DESKTOP")) { QIcon::setThemeSearchPaths({resolveFilePath(QStringLiteral(".")), QStringLiteral(":/icons")}); QIcon::setThemeName(QStringLiteral("breeze-internal")); }