Bug 178821 - font rendering in list view broken with no unread feeds
Summary: font rendering in list view broken with no unread feeds
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 177297 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-26 18:25 UTC by Andreas Kuhl
Modified: 2009-05-07 14:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screen shot of problem still remaining (19.51 KB, image/png)
2009-01-17 14:16 UTC, Jonathan Marten
Details
Patch to explicitly specify row height (1.01 KB, patch)
2009-01-17 14:19 UTC, Jonathan Marten
Details
Updated patch to explictly specify row height (2.51 KB, patch)
2009-01-25 17:43 UTC, Jonathan Marten
Details
Screen shot of same problem in KMail (15.73 KB, image/png)
2009-01-26 19:04 UTC, Jonathan Marten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kuhl 2008-12-26 18:25:53 UTC
Version:            (using Devel)
Installed from:    Compiled sources

When there are unread feeds in the list view, the font rendering is quite normal:
http://imagebin.ca/view/6Vo5l-3P.html

But as soon as there are no unread feeds left, the font rendering breaks to something like this:
http://imagebin.ca/view/Gk4mjkl.html

Both screens show the same font settings (SegoeUI 9pt with full RGB subpixel hinting).
Comment 1 Andreas Kuhl 2008-12-26 18:30:32 UTC
Analyzing both screenshots side-by-side, I need to substantiate my bug report:
The font rendering seems to stay the same, but the line height of each feed entry does not:

When there is at least one bold (unread) feed entry, all feed entries have a slightly larger line-height. All lines have the height of the largest font (the bold one). With no bold (unread feeds), the line height of every feed entry decreases.

Compare both screenshots side-by-side and you'll understand what I mean! :-)
Still a bug, though. 
Comment 2 Andreas Kuhl 2008-12-26 18:31:39 UTC
Version: KDE 4.2 Beta 2 (4.1.85) from openSUSE 11.1 BuildService RPMs.
Comment 3 Frank Osterfeld 2009-01-10 23:05:18 UTC
SVN commit 909046 by osterfeld:

don't assume uniform row heights in the feed list (which changes with unread items)
BUG: 178821


 _M            . (directory)  
 M  +0 -1      akregator/src/subscriptionlistview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=909046
Comment 4 Frank Osterfeld 2009-01-11 00:47:37 UTC
*** Bug 177297 has been marked as a duplicate of this bug. ***
Comment 5 Frank Osterfeld 2009-01-14 17:52:23 UTC
SVN commit 911028 by osterfeld:

backport:

don't assume uniform row heights in the feed list (which changes with unread items)
CCBUG: 178821


 M  +0 -1      subscriptionlistview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=911028
Comment 6 Jonathan Marten 2009-01-17 14:15:40 UTC
Row height changing has now been fixed in trunk, but with the worse of the two possible outcomes - the feed list icons are now squashed together with no space between them.  See attached screen shot.
Comment 7 Jonathan Marten 2009-01-17 14:16:38 UTC
Created attachment 30343 [details]
Screen shot of problem still remaining

With no unread feeds, but still with squashed rows
Comment 8 Jonathan Marten 2009-01-17 14:19:15 UTC
Would the attached patch solve the problem (without being too inefficient?)
Comment 9 Jonathan Marten 2009-01-17 14:19:51 UTC
Created attachment 30344 [details]
Patch to explicitly specify row height
Comment 10 Frank Osterfeld 2009-01-24 18:27:12 UTC
Doesn't your patch break if the font is bigger than the icons?
Comment 11 Jonathan Marten 2009-01-24 18:54:17 UTC
Er, just tried it and it does.  Perhaps it needs to check the font height as well, and not return a hint if the font would be bigger than (icon size + margin)?
Comment 12 Jonathan Marten 2009-01-25 17:43:03 UTC
Created attachment 30595 [details]
Updated patch to explictly specify row height

Calculate the row height as the maximum of the icon size and both normal and bold font variants.

Surely there must be an easier way of specifying a fixed row spacing in a simple tree view...
Comment 13 Andreas Kuhl 2009-01-25 18:03:38 UTC
This behaviour does not happen in KMail, so maybe we should have a look at how it's done over there.
Comment 14 Jonathan Marten 2009-01-26 19:04:54 UTC
Created attachment 30635 [details]
Screen shot of same problem in KMail

Regarding comment #13: KMail does seem to have partly the same problem.  The row height does not change as new messages come and go, because they also have setUniformRowHeights(false) as the Akgregator commit in comment #3 removed.  However, the rows do run together (no space between them) as this screenshot shows - it's just that the standard "folder" icons in KMail have a top and bottom margin so the effect is not so obvious.
Comment 15 Jonathan Marten 2009-05-04 10:43:45 UTC
Patch in comment #12 submitted as http://reviewboard.kde.org/r/668/
Comment 16 Jonathan Marten 2009-05-07 14:09:58 UTC
SVN commit 964725 by marten:

Add some line spacing between Akregator's feed list rows, so that the site
favicons do not run into each other.  Particularly noticeable in this application,
because many sites' favicons are square with no margin.

Do this via an item delegate (SubscriptionListDelegate) so that the model need
not concern itself with the intended list appearance.  To follow this principle,
also move the unread articles => bold font setting to the delegate.  Add a new
data role HasUnreadRole so that the delegate can fetch this information from
the model.

BUG:178821


 M  +1 -0      CMakeLists.txt  
 A             subscriptionlistdelegate.cpp   [License: GPL (v2+) (+Qt exception)]
 A             subscriptionlistdelegate.h   [License: GPL (v2+) (+Qt exception)]
 M  +4 -8      subscriptionlistmodel.cpp  
 M  +2 -1      subscriptionlistmodel.h  
 M  +3 -0      subscriptionlistview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=964725