Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Update
kio
Always-reserve-space-for-icons.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File Always-reserve-space-for-icons.patch of Package kio
From 31361267d41977047e2523ae95718b20713d0d6d Mon Sep 17 00:00:00 2001 From: Fabian Vogt <fabian@ritter-vogt.de> Date: Tue, 15 Aug 2017 10:17:29 +0200 Subject: KFileItemDelegate: Always reserve space for icons Summary: Even null icons are drawn so also reserve space for them to avoid overlapping. BUG: 372207 Test Plan: http://imgur.com/a/fG2T0 Reviewers: #frameworks Subscribers: #frameworks Tags: #frameworks Differential Revision: https://phabricator.kde.org/D7318 --- src/widgets/kfileitemdelegate.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/widgets/kfileitemdelegate.cpp b/src/widgets/kfileitemdelegate.cpp index f18eb35..3dd8eb7 100644 --- a/src/widgets/kfileitemdelegate.cpp +++ b/src/widgets/kfileitemdelegate.cpp @@ -832,6 +832,7 @@ void KFileItemDelegate::Private::initStyleOption(QStyleOptionViewItem *option, } option->icon = decoration(*option, index); + // Note that even null icons are still drawn for alignment if (!option->icon.isNull()) { option->features |= QStyleOptionViewItem::HasDecoration; } @@ -1094,10 +1095,6 @@ QIcon KFileItemDelegate::Private::decoration(const QStyleOptionViewItem &option, QRect KFileItemDelegate::Private::labelRectangle(const QStyleOptionViewItem &option) const { - if (option.icon.isNull()) { - return subtractMargin(option.rect, Private::ItemMargin); - } - const QSize decoSize = addMargin(option.decorationSize, Private::IconMargin); const QRect itemRect = subtractMargin(option.rect, Private::ItemMargin); QRect textArea(QPoint(0, 0), itemRect.size()); -- cgit v0.11.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor