Summary: | visual glitch in KCategorizedView | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdelibs | Reporter: | Hugo Pereira Da Costa <hugo.pereira.da.costa> |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hugo.pereira.da.costa, pano_90, peter.penz19 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | show bottom-truncated category text |
Description
Hugo Pereira Da Costa
2010-01-15 00:30:59 UTC
Created attachment 39908 [details]
show bottom-truncated category text
Following patch should fix it: =================================================================== --- kdelibs/kdeui/itemviews/kcategorydrawer.cpp (revision 1074886) +++ kdelibs/kdeui/itemviews/kcategorydrawer.cpp (working copy) @@ -143,8 +143,10 @@ textRect.setLeft(textRect.left() + 7); textRect.setHeight(fontMetrics.height()); textRect.setRight(textRect.right() - 7); - textRect.setBottom(textRect.bottom() - 5); // only one pixel separation here (no gradient) + // this is wrong. This truncates the text to be drawn. + //textRect.setBottom(textRect.bottom() - 5); // only one pixel separation here (no gradient) + painter->save(); painter->setFont(font); QColor penColor(option.palette.text().color()); (since the rect height is set to the fontMetrics, it should _not_ be reduced using "setBottom" immediately after, otherwise the text is obviously truncated as described in the bug. I think) *** Bug 215586 has been marked as a duplicate of this bug. *** SVN commit 1075141 by hpereiradacosta: Fix visual bug in category drawing. The text is truncated at the bottom because textRect height is shorten after it has been adjusted to the fontmetrics. I just removed the corresponding line of code CCBUG: 222794 --This line, and those below, will be ignored-- M kcategorydrawer.cpp M +0 -1 kcategorydrawer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1075141 SVN commit 1075143 by hpereiradacosta: Backport r1075141. Fix visual bug in category text drawing. The text is truncated at the bottom because textRect height is shorten after it has been adjusted to the fontmetrics. I just removed the corresponding line of code. BUG: 222794 M +0 -1 kcategorydrawer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1075143 |