Bug 314879 - Taskbar vertically misplaces window titles, cuts off "g", "y", "j" etc
Summary: Taskbar vertically misplaces window titles, cuts off "g", "y", "j" etc
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-taskbar (show other bugs)
Version: 4.10.90
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
: 321747 321805 321847 (view as bug list)
Depends on:
Reported: 2013-02-11 09:06 UTC by Thomas Fischer
Modified: 2013-07-23 10:28 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11
Sentry Crash Report:

The filename is gyjgyj.txt, but the letters' lower parts are cut off (2.11 KB, image/png)
2013-02-11 09:07 UTC, Thomas Fischer
Similar, yet less severe cut-off (6.79 KB, image/png)
2013-02-18 08:23 UTC, Thomas Fischer

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Fischer 2013-02-11 09:06:23 UTC
Switching to KDE 4.10.0, I noticed that in the task bar the window labels are vertically misplaced (too far down) and thus the lower part of some letters such as "g", "y", or "j" gets cut off.

The attached screenshot shows Kate's entry in the taskbar, the filename is "gyjgyj.txt".

Reproducible: Always
Comment 1 Thomas Fischer 2013-02-11 09:07:16 UTC
Created attachment 77123 [details]
The filename is gyjgyj.txt, but the letters' lower parts are cut off
Comment 2 Thomas Fischer 2013-02-18 08:23:36 UTC
Created attachment 77399 [details]
Similar, yet less severe cut-off
Comment 3 David Edmundson 2013-06-05 23:40:18 UTC
Thank you for your report.

The taskbar applet has been completely rewritten for KDE Workspaces 4.11
I cannot reproduce this bug with the new version.

Please reopen this bug if you encounter this in 4.11 onwards.
Comment 4 Christoph Feck 2013-06-09 23:02:08 UTC
In fact, I am getting this bug _since_ the 4.11 rewrite.
Comment 5 Anne-Marie Mahfouf 2013-06-10 07:08:26 UTC
I reproduce on master, it's fine on 4.10 branch
Comment 6 Aaron J. Seigo 2013-06-15 14:45:53 UTC
3 different bugs in one report :) Must be a record of some sort.

* There's the cuttof in kickoff.
* A similar cuttoff in the taskbar in 4.10
* A new cuttoff in the taskbar in 4.11

The cutoff in kickoff is a bug, though it might be a Qt font rendering bug (not sure, haven't looked yet). The taskbar is replaced in 4.11 so the second bug is not interesting. The third one .. well, yes, this is a known issue. I'm leaving this open to remind us of that.

In future, please, please, please one bug per report.
Comment 7 Christoph Feck 2013-06-29 11:32:53 UTC
*** Bug 321747 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2013-06-30 23:04:28 UTC
*** Bug 321805 has been marked as a duplicate of this bug. ***
Comment 9 Pascal d'Hermilly 2013-06-30 23:14:25 UTC
The cutoff in the new taskbar depends on the height of the panel. With my set panel height I only have half the letters.
Comment 10 Pascal d'Hermilly 2013-07-02 08:45:58 UTC
The panel height has to be at least 38px to not be cutting off.
Comment 11 Christoph Feck 2013-07-02 11:49:24 UTC
*** Bug 321847 has been marked as a duplicate of this bug. ***
Comment 12 FBrown 2013-07-03 20:02:02 UTC
Also seeing this in 4.10.90 (4.11b2)
Comment 13 Kåre Särs 2013-07-03 23:45:48 UTC
The new taskbar (4.10.90) now strictly follows the margins of the themes. Most themes set quite big margins, which does not work very well if you want a compact taskbar. There simply is no space left for the text. 

Plateau is a theme that has small margins around the task items. You can use just the "Task items" from Plateau if you use the Customized setting.

I see three solutions to the problem:
1) We ask the users to use themes with less margin.
2) We go back to removing margins in stead of text and icon when the space is scarce. This has the drawback that it destroys the visual design and potentially makes it look ugly.
3) We add a compact task item to the theme standard

I prefer solution 2  ;)  A patch for that is attached to bug 321847
Comment 14 Christoph Feck 2013-07-04 00:51:49 UTC
The issue isn't the margins, but
1) it first renders the text, then the frame (should be reversed)
2) the text isn't correctly centered (but the icon is)
Comment 15 Pascal d'Hermilly 2013-07-04 07:36:57 UTC
As can be seen by re-sizing the panel, nothing else in the panel uses these margins. So no the taskbar should not either.
Comment 16 Christoph Feck 2013-07-20 16:53:17 UTC
You were right, and I was wrong. The pixmap into which the text is rendered into is indeed a rect inside the margins.

Review request: https://git.reviewboard.kde.org/r/111621/
Comment 17 Christoph Feck 2013-07-23 10:24:18 UTC
Git commit e73da75872b952a3c17d50748fdfe7445a1ee020 by Christoph Feck.
Committed on 23/07/2013 at 10:20.
Pushed by cfeck into branch 'KDE/4.11'.

Increase size of label pixmap to account for margins and shadows

The text label is rendered into a pixmap which can be
smaller than the actual text, because the item rect is
inside some margins.

This patch does two things:
- increase the pixmap size by 4 pixels on top and bottom
- fix the text positioning
REVIEW: 111621

M  +5    -5    plasma/desktop/applets/tasks/support/textlabel.cpp