Review Request: Fix text centering in task manager task items

Alec Moskvin AlecM at gmx.com
Fri Jul 17 03:52:00 CEST 2009



> On 2009-07-16 07:54:09, Marco Martin wrote:
> > yeah, the text ends up definitely not centered :(
> > http://imagebin.ca/view/hGiPl3.html

What's interesting is that it's actually pretty well-centered, but it looks way off if the text has no "descenders."

http://img91.imageshack.us/img91/6456/dilemma.png

Not a simple problem :\


- Alec


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/980/#review1620
-----------------------------------------------------------


On 2009-07-16 00:01:27, Alec Moskvin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/980/
> -----------------------------------------------------------
> 
> (Updated 2009-07-16 00:01:27)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> This patch properly aligns text to the drawable rectangle, thus preventing any part of the text from being cut off if there is still space available.
> 
> It removes two things:
> 
> - Code that sets the text at (0, 0) if the "text" is larger than the rectangle (which is not correct since there is additional interline spacing added to top and bottom which need not be shown)
> 
> - The part where it for some strange reason lowers all the text by the difference between the height of the 'M' and the 'x', thus pushing it out of the drawable area.
> 
> 
> This addresses bug 178776.
>     https://bugs.kde.org/show_bug.cgi?id=178776
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdebase/workspace/plasma/applets/tasks/abstracttaskitem.cpp 997548 
> 
> Diff: http://reviewboard.kde.org/r/980/diff
> 
> 
> Testing
> -------
> 
> Compiled it on my machine - it works well with task manager of any size.
> 
> 
> Screenshots
> -----------
> 
> 
>   http://reviewboard.kde.org/r/980/s/139/
> 
> 
> Thanks,
> 
> Alec
> 
>



More information about the Plasma-devel mailing list