Review Request: Improve rendering of Plasma Image-Wallpaper list items using QTextDocument to layout the text
Darío Andrés
andresbajotierra at gmail.com
Sun Mar 28 18:36:48 CEST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3417/
-----------------------------------------------------------
Review request for Plasma.
Summary
-------
Update BackgroundDelegate to use QTextDocument in order to improve text layouting.
Now, all the text is properly centered and long titles are wordwrapped correctly, maximizing the space usage.
Compare http://bugsfiles.kde.org/attachment.cgi?id=42291 (from the bug report) and the attached screenshot
I also cached some values to avoid a lot of calculations (useless as the ratio is not going to change)
- Should some other values be cached too ? (the smallest font size?)
This addresses bug 232348.
https://bugs.kde.org/show_bug.cgi?id=232348
Diffs
-----
svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase/workspace/plasma/generic/wallpapers/image/backgrounddelegate.h 1107102
svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase/workspace/plasma/generic/wallpapers/image/backgrounddelegate.cpp 1107102
Diff: http://reviewboard.kde.org/r/3417/diff
Testing
-------
I have tested it and it works OK.
There could be a minimal performance drop (as I guess that using QTextDocument takes more time than a few drawText() and QRect constructor calls); however I couldn't really notice it
Screenshots
-----------
Layouting improved
http://reviewboard.kde.org/r/3417/s/344/
Thanks,
Darío
More information about the Plasma-devel
mailing list