Summary: | list view branches misdrawn if items are hidden | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | _ <praseodym+kdebugzilla> |
Component: | kstyle | Assignee: | Karol Szwed <gallium> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cshobe |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | do not extend dotlinery for a hidden item |
Description
_
2003-09-11 16:34:46 UTC
Subject: Re: [Kopete-devel] New: contact list hiding mistake (cosmetical) Bug in QListView. Known already to TT. I don't expect a fix though as QListView will disappear in Qt 4. Feel free to submit your own patch :) not an expert at this... *** Bug 65976 has been marked as a duplicate of this bug. *** *sigh*...not fixed...invalid. QT bug. Actually not. QListView drawing for KDE styles is done by code in kdelibs/kdefx. Qt is broken too, of course, but we can fix this. Created attachment 3362 [details]
do not extend dotlinery for a hidden item
Patch attached. Not sure whether I want to touch this before 3.2, though ---
the code is non-trivial, while the bug is very minor.
Subject: kdelibs/kdefx CVS commit by orlovich: Fully skip invisible items to avoid drawing "extra" lines if some end items are invisible. (#64083) CCMAIL:64083-done@bugs.kde.org M +14 -2 kstyle.cpp 1.47 --- kdelibs/kdefx/kstyle.cpp #1.46:1.47 @@ -985,4 +985,16 @@ int KStyle::pixelMetric(PixelMetric m, c } +//Helper to find the next sibling that's not hidden +static QListViewItem* nextVisibleSibling(QListViewItem* item) +{ + QListViewItem* sibling = item; + do + { + sibling = sibling->nextSibling(); + } + while (sibling && !sibling->isVisible()); + + return sibling; +} void KStyle::drawComplexControl( ComplexControl control, @@ -1213,8 +1225,8 @@ void KStyle::drawComplexControl( Complex y += child->totalHeight(); - child = child->nextSibling(); + child = nextVisibleSibling(child); } - if ( child ) // there's a child, so move linebot to edge of rectangle + if ( child ) // there's a child to draw, so move linebot to edge of rectangle linebot = r.height(); |