Bug 178776 - Taskbar items have too much space above text but the bottom gets cut off
Summary: Taskbar items have too much space above text but the bottom gets cut off
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-taskbar (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-12-26 04:20 UTC by Alec Moskvin
Modified: 2009-07-21 02:16 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
This is in KDE 4.1.85 (KDE 4.2 Beta2) (17.17 KB, image/png)
2008-12-26 04:21 UTC, Alec Moskvin
Details
Screenshot: taskbar Ok (24.36 KB, image/jpeg)
2009-04-25 19:34 UTC, Dario Andres
Details
Still looks exactly the same in KDE 4.2.91 (24.72 KB, image/png)
2009-06-13 18:04 UTC, Alec Moskvin
Details
Patch to center the text inside the task item (596 bytes, patch)
2009-06-14 18:44 UTC, Alec Moskvin
Details
Screenshot with patch applied (29.71 KB, image/png)
2009-06-25 02:41 UTC, Alec Moskvin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Moskvin 2008-12-26 04:20:00 UTC
Version:            (using Devel)
Compiler:          gcc (Gentoo 4.3.2 p1.2) 4.3.2 
OS:                Linux
Installed from:    Compiled sources

When using two rows (and the items on the taskbar are small), the text gets aligned incorrectly - it's a bit too low. As a result, even though there is enough space above, the bottom parts of each letter get cut off.

Please see the attachment.
Comment 1 Alec Moskvin 2008-12-26 04:21:40 UTC
Created attachment 29631 [details]
This is in KDE 4.1.85 (KDE 4.2 Beta2)
Comment 2 Beat Wolf 2008-12-26 10:00:02 UTC
And in an inpolite manner of bug hijacking i would like to mention that the text is also not correctly aligned in the group popup of the taskbar, when the panel is verticaly aligned. Here it's how it looks.
http://www.fryx.ch/Asraniel/taskgroup.png

Fell free to ignore this, but since the same code is probably responsible, this might be usefull.
Comment 3 Marco Martin 2008-12-26 17:46:26 UTC
really weird, i have the exact opposite problem (text goes too high), font metrics are evil..
Comment 4 Aaron J. Seigo 2008-12-26 20:14:25 UTC
@Beat Wolf: no, it's not the same code, and i doubt it has anything to do with vertical vs horizontal either =)
Comment 5 Aaron J. Seigo 2008-12-26 20:28:30 UTC
SVN commit 901833 by aseigo:

fix up group list
CCBUG:178776


 M  +7 -3      tasksmenu.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=901833
Comment 6 Dario Andres 2009-04-09 00:19:21 UTC
Can you still reproduce this bug with a recent KDE (4.1.4 / 4.2.2 / 4.2svn / 4.3svn) ? Thanks :)
Comment 7 Alec Moskvin 2009-04-13 00:14:57 UTC
Darío Andrés,

I updated to KDE 4.2.2 today and I can still reproduce this bug.
Comment 8 Dario Andres 2009-04-13 01:41:07 UTC
Thanks for updating
Comment 9 Dario Andres 2009-04-25 19:34:19 UTC
Here using:

Qt: 4.5.0 + qt-copy-patches-942255
KDE: 4.2.70 (KDE 4.2.70 (KDE 4.3 >= 20090415))
kdelibs svn rev. 958964 / kdebase svn rev. 958965
on ArchLinux i686 - Kernel 2.6.29.1

I can't reproduce. Attaching screenshot
Comment 10 Dario Andres 2009-04-25 19:34:51 UTC
Created attachment 33098 [details]
Screenshot: taskbar Ok
Comment 11 Ruchir Brahmbhatt 2009-04-26 19:20:19 UTC
I also can't reproduce. I kept panel height less but font's don't cut.
Comment 12 Alec Moskvin 2009-06-13 18:00:30 UTC
Sorry, but I'm still getting the exact same problem...

Qt: 4.5.1
KDE: 4.2.91 (KDE 4.2.91 (KDE 4.3 >= 20090609))
Comment 13 Alec Moskvin 2009-06-13 18:04:54 UTC
Created attachment 34502 [details]
Still looks exactly the same in KDE 4.2.91
Comment 14 Aaron J. Seigo 2009-06-13 18:14:54 UTC
the new screenshot doesn't show any fonts being cut off, it shows the text being rendered outside the button's visual border area. the font is aligned to the top of the button's visual area in that shot, so it seems to my eyes that the issue is that the buttons are allowed to go a bit too small (e.g. there should be just one row there, not two) ... but i don't see font rendering issues there.
Comment 15 Alec Moskvin 2009-06-14 18:42:01 UTC
Aaron,

I never said it was rendered incorrectly - it's just not centered properly.

Here's a patch!
Comment 16 Alec Moskvin 2009-06-14 18:44:05 UTC
Created attachment 34527 [details]
Patch to center the text inside the task item

The code was checked out from:

svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase/workspace/plasma/applets/tasks/
Comment 17 Alec Moskvin 2009-06-25 02:41:09 UTC
Created attachment 34796 [details]
Screenshot with patch applied

If anyone doubts it, here's a screenshot of a really thin task bar with the patch applied. As you can see, the text does not get cut off.

The patch removed two things: (1) 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), and (2) 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.
Comment 18 Alec Moskvin 2009-07-21 02:16:02 UTC
Marking bug as fixed.

Fix is here:
http://reviewboard.kde.org/r/980/

Commit is here:
http://websvn.kde.org/?view=rev&revision=999679