Hello community, here is the log from the commit of package kio for openSUSE:Factory checked in at 2018-01-22 16:09:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kio (Old) and /work/SRC/openSUSE:Factory/.kio.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kio" Mon Jan 22 16:09:08 2018 rev:59 rq:567244 version:5.42.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kio/kio.changes 2018-01-16 09:41:09.585089672 +0100 +++ /work/SRC/openSUSE:Factory/.kio.new/kio.changes 2018-01-22 16:09:14.799958799 +0100 @@ -1,0 +2,14 @@ +Tue Jan 16 22:50:18 CET 2018 - [email protected] + +- Update to 5.42.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.42.0.php +- Changes since 5.41.0: + * Too many changes to list here +- Add upstream patch fix-overlap-of-first-item-in-kfileplacesview.patch: + * Fixes overlapping in items in the places view +- Dropped patches, now upstream: + * fix-handling-of-KCookieAdvice_AcceptForSession.patch + +------------------------------------------------------------------- Old: ---- fix-handling-of-KCookieAdvice_AcceptForSession.patch kio-5.41.0.tar.xz New: ---- fix-overlap-of-first-item-in-kfileplacesview.patch kio-5.42.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kio.spec ++++++ --- /var/tmp/diff_new_pack.uf4AqL/_old 2018-01-22 16:09:15.535924365 +0100 +++ /var/tmp/diff_new_pack.uf4AqL/_new 2018-01-22 16:09:15.539924179 +0100 @@ -17,9 +17,9 @@ %bcond_without lang -%define _tar_path 5.41 +%define _tar_path 5.42 Name: kio -Version: 5.41.0 +Version: 5.42.0 Release: 0 %define kf5_version %{version} # Full KF5 version (e.g. 5.33.0) @@ -35,9 +35,9 @@ # PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5 Patch0: kio_help-fallback-to-kde4-docs.patch # PATCH-FIX-UPSTREAM -Patch1: fix-handling-of-KCookieAdvice_AcceptForSession.patch +Patch1: 0001-Fix-KFilePreviewGenerator-LayoutBlocker.patch # PATCH-FIX-UPSTREAM -Patch2: 0001-Fix-KFilePreviewGenerator-LayoutBlocker.patch +Patch2: fix-overlap-of-first-item-in-kfileplacesview.patch BuildRequires: cmake >= 3.0 BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: fdupes ++++++ fix-overlap-of-first-item-in-kfileplacesview.patch ++++++ >From bd5b09c1d126158b4ce155ef5106234b9e8068d4 Mon Sep 17 00:00:00 2001 From: Fabian Vogt <[email protected]> Date: Sat, 13 Jan 2018 18:46:50 +0100 Subject: [PATCH] Fix overlap of the first item in KFilePlacesView Summary: The first item overlapped both the section header and the item below. This was caused by taking the spacing wrongly into account. Additionally, the paint function's option's rect was not moved correctly, as the unmodified option.rect was used in some places. Test Plan: https://i.imgur.com/LJuACt2.png -> https://i.imgur.com/nYpdoXn.png Reviewers: #frameworks, dfaure, renatoo Tags: #frameworks Differential Revision: https://phabricator.kde.org/D9863 --- src/filewidgets/kfileplacesview.cpp | 45 +++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 22 deletions(-) Index: kio-5.42.0/src/filewidgets/kfileplacesview.cpp =================================================================== --- kio-5.42.0.orig/src/filewidgets/kfileplacesview.cpp +++ kio-5.42.0/src/filewidgets/kfileplacesview.cpp @@ -170,10 +170,9 @@ void KFilePlacesViewDelegate::paint(QPai drawSectionHeader(painter, opt, index); } + // Move the target rect to the actual item rect const int headerHeight = sectionHeaderHeight(); - const int headerSpace = (headerHeight / 2) + qMax(2, m_view->spacing()); - painter->translate(0, headerSpace); - opt.rect.translate(0, headerSpace); + opt.rect.translate(0, headerHeight); opt.rect.setHeight(opt.rect.height() - headerHeight); } @@ -193,22 +192,22 @@ void KFilePlacesViewDelegate::paint(QPai QApplication::style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter); const KFilePlacesModel *placesModel = static_cast<const KFilePlacesModel *>(index.model()); - bool isLTR = option.direction == Qt::LeftToRight; + bool isLTR = opt.direction == Qt::LeftToRight; QIcon icon = index.model()->data(index, Qt::DecorationRole).value<QIcon>(); - QPixmap pm = icon.pixmap(m_iconSize, m_iconSize, (option.state & QStyle::State_Selected) && (option.state & QStyle::State_Active) ? QIcon::Selected : QIcon::Normal); - QPoint point(isLTR ? option.rect.left() + LATERAL_MARGIN - : option.rect.right() - LATERAL_MARGIN - m_iconSize, option.rect.top() + (option.rect.height() - m_iconSize) / 2); + QPixmap pm = icon.pixmap(m_iconSize, m_iconSize, (opt.state & QStyle::State_Selected) && (opt.state & QStyle::State_Active) ? QIcon::Selected : QIcon::Normal); + QPoint point(isLTR ? opt.rect.left() + LATERAL_MARGIN + : opt.rect.right() - LATERAL_MARGIN - m_iconSize, opt.rect.top() + (opt.rect.height() - m_iconSize) / 2); painter->drawPixmap(point, pm); - if (option.state & QStyle::State_Selected) { + if (opt.state & QStyle::State_Selected) { QPalette::ColorGroup cg = QPalette::Active; - if (!(option.state & QStyle::State_Enabled)) { + if (!(opt.state & QStyle::State_Enabled)) { cg = QPalette::Disabled; - } else if (!(option.state & QStyle::State_Active)) { + } else if (!(opt.state & QStyle::State_Active)) { cg = QPalette::Inactive; } - painter->setPen(option.palette.color(cg, QPalette::HighlightedText)); + painter->setPen(opt.palette.color(cg, QPalette::HighlightedText)); } QRect rectText; @@ -225,10 +224,10 @@ void KFilePlacesViewDelegate::paint(QPai painter->save(); painter->setOpacity(painter->opacity() * contentsOpacity(index)); - int height = option.fontMetrics.height() + CAPACITYBAR_HEIGHT; - rectText = QRect(isLTR ? m_iconSize + LATERAL_MARGIN * 2 + option.rect.left() - : 0, option.rect.top() + (option.rect.height() / 2 - height / 2), option.rect.width() - m_iconSize - LATERAL_MARGIN * 2, option.fontMetrics.height()); - painter->drawText(rectText, Qt::AlignLeft | Qt::AlignTop, option.fontMetrics.elidedText(index.model()->data(index).toString(), Qt::ElideRight, rectText.width())); + int height = opt.fontMetrics.height() + CAPACITYBAR_HEIGHT; + rectText = QRect(isLTR ? m_iconSize + LATERAL_MARGIN * 2 + opt.rect.left() + : 0, opt.rect.top() + (opt.rect.height() / 2 - height / 2), opt.rect.width() - m_iconSize - LATERAL_MARGIN * 2, opt.fontMetrics.height()); + painter->drawText(rectText, Qt::AlignLeft | Qt::AlignTop, opt.fontMetrics.elidedText(index.model()->data(index).toString(), Qt::ElideRight, rectText.width())); QRect capacityRect(isLTR ? rectText.x() : LATERAL_MARGIN, rectText.bottom() - 1, rectText.width() - LATERAL_MARGIN, CAPACITYBAR_HEIGHT); KCapacityBar capacityBar(KCapacityBar::DrawTextInline); capacityBar.setValue((info.used() * 100) / info.size()); @@ -241,9 +240,9 @@ void KFilePlacesViewDelegate::paint(QPai } } - rectText = QRect(isLTR ? m_iconSize + LATERAL_MARGIN * 2 + option.rect.left() - : 0, option.rect.top(), option.rect.width() - m_iconSize - LATERAL_MARGIN * 2, option.rect.height()); - painter->drawText(rectText, Qt::AlignLeft | Qt::AlignVCenter, option.fontMetrics.elidedText(index.model()->data(index).toString(), Qt::ElideRight, rectText.width())); + rectText = QRect(isLTR ? m_iconSize + LATERAL_MARGIN * 2 + opt.rect.left() + : 0, opt.rect.top(), opt.rect.width() - m_iconSize - LATERAL_MARGIN * 2, opt.rect.height()); + painter->drawText(rectText, Qt::AlignLeft | Qt::AlignVCenter, opt.fontMetrics.elidedText(index.model()->data(index).toString(), Qt::ElideRight, rectText.width())); if (drawCapacityBar && contentsOpacity(index) > 0) { painter->restore(); @@ -434,12 +433,14 @@ void KFilePlacesViewDelegate::drawSectio QRect textRect(option.rect); textRect.setLeft(textRect.left() + 3); - textRect.setY(textRect.y() + qMax(2, m_view->spacing())); + /* Take spacing into account: + The spacing to the previous section compensates for the spacing to the first item.*/ + textRect.setY(textRect.y() /* + qMax(2, m_view->spacing()) - qMax(2, m_view->spacing())*/); textRect.setHeight(sectionHeaderHeight()); painter->save(); - // based on dolphoin colors + // based on dolphin colors const QColor c1 = textColor(option); const QColor c2 = baseColor(option); QColor penColor = mixedColor(c1, c2, 60); @@ -473,8 +474,8 @@ QColor KFilePlacesViewDelegate::mixedCol int KFilePlacesViewDelegate::sectionHeaderHeight() const { - return QApplication::fontMetrics().height() + - (qMax(2, m_view->spacing()) * 2); + // Account for the spacing between header and item + return QApplication::fontMetrics().height() + qMax(2, m_view->spacing()); } ++++++ kio-5.41.0.tar.xz -> kio-5.42.0.tar.xz ++++++ ++++ 196835 lines of diff (skipped)
