After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787260 - Too large window title padding on the right
Too large window title padding on the right
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
3.25.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
triaged
: 788660 788849 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-04 15:05 UTC by Alexander Mikhaylenko
Modified: 2020-02-19 10:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (391.36 KB, image/png)
2017-09-04 15:05 UTC, Alexander Mikhaylenko
Details
Screenshot v2 (368.27 KB, image/png)
2017-09-04 15:14 UTC, Alexander Mikhaylenko
Details
Screenshot of long window title text (730.43 KB, image/png)
2017-09-04 15:21 UTC, Jonas Ådahl
Details
Screenshot of short window title text (739.37 KB, image/png)
2017-09-04 15:21 UTC, Jonas Ådahl
Details
Another screenshot of a long window title (1.38 MB, image/png)
2017-09-04 15:37 UTC, Florian Müllner
Details
Empty space on the right with Cantarell at 10 pt (546.99 KB, image/png)
2018-04-13 20:42 UTC, Athul Iddya
Details
Ellipsized text with Cantarell at 12 pt on X11 (537.04 KB, image/png)
2018-04-13 20:44 UTC, Athul Iddya
Details
Ellipsized text with Roboto at the default 11 pt on X11 (538.10 KB, image/png)
2018-04-13 20:45 UTC, Athul Iddya
Details

Description Alexander Mikhaylenko 2017-09-04 15:05:49 UTC
Created attachment 359085 [details]
Screenshot

See screenshot
Comment 1 Florian Müllner 2017-09-04 15:10:05 UTC
What is the bug (in your opinion)? Do you mean the padding between close button and other titlebar elements?

(In that case, gnome-shell isn't involved at all, as the window uses client-side decorations - that is, the entire titlebar is handled by the app/toolkit)
Comment 2 Alexander Mikhaylenko 2017-09-04 15:14:29 UTC
Created attachment 359086 [details]
Screenshot v2

Sorry, I was unclear. I've marked it on the screenshot now.

Another example is here: https://didrocks.fr/images/artful-shell-transition/overview.png
See "Documents     " on that screenshot. The longer the title is, the larger is the space there.
Comment 3 Alexander Mikhaylenko 2017-09-04 15:16:11 UTC
OMG, I've only now noticed that I typed "titlebar" instead of "title".
Comment 4 Florian Müllner 2017-09-04 15:18:38 UTC
(In reply to Alexander Mikhaylenko from comment #3)
> OMG, I've only now noticed that I typed "titlebar" instead of "title".

Yup, that's what threw me off :-)
Comment 5 Jonas Ådahl 2017-09-04 15:21:13 UTC
Created attachment 359087 [details]
Screenshot of long window title text

Seems the padding (of the on-hover window title label displayed on the lower part of the window preview) gets bigger for longer texts. Is that expected? Attaching two screenshots for comparison
Comment 6 Jonas Ådahl 2017-09-04 15:21:36 UTC
Created attachment 359088 [details]
Screenshot of short window title text
Comment 7 Florian Müllner 2017-09-04 15:37:53 UTC
Created attachment 359091 [details]
Another screenshot of a long window title

(In reply to Jonas Ådahl from comment #5)
> Created attachment 359087 [details]
> Screenshot of long window title text
> 
> Seems the padding (of the on-hover window title label displayed on the lower
> part of the window preview) gets bigger for longer texts. Is that expected?

No, it's not expected. In fact, I'm not seeing the issue at all (see screenshot), nor is there anything suspicious at a quick glance - there's nothing manual about the padding, it's simply CSS applied to a label ...
Comment 8 Alexander Mikhaylenko 2017-09-13 07:56:14 UTC
Hmm, I can't reproduce this anymore on GNOME Shell 3.26.0, at least on X11.
Comment 9 Eddy Castillo 2017-09-14 00:34:11 UTC
Can confirm in Wayland, but cannot reproduce on X.

Same padding to the right of title just as in the screenshots already attached here.
Comment 10 Florian Müllner 2017-10-08 10:18:04 UTC
*** Bug 788660 has been marked as a duplicate of this bug. ***
Comment 11 Florian Müllner 2017-10-08 10:34:05 UTC
(In reply to Florian Müllner from comment #7)
> No, it's not expected. In fact, I'm not seeing the issue at all

That was because I was on X at that moment - as others have noted, this is a wayland issue.

But it's still a mystery to me what's going on:

 - the width request of the label's ClutterText is correct
 - the horizontal padding stored in the label's theme node
   is correct
 - the label's width request boils down to "clutter_text's width
   + padding", but for some reason is too big on wayland
Comment 12 Florian Müllner 2017-10-11 22:38:05 UTC
*** Bug 788849 has been marked as a duplicate of this bug. ***
Comment 13 Alexandre Franke 2017-12-22 10:17:33 UTC
It may be worth noting this wasn't happening in 3.24.
Comment 14 Sebastian Keller 2018-02-06 15:52:16 UTC
When investigating this issue I noticed that using Main.layoutManager.addChrome() to add the label instead of adding it to parentActor seems to result in the correct size. This is also what the dash tooltips use.

I'm not sure why this works and I doubt it would be the correct approach though. Maybe the WindowCloneLayout LayoutManager does something that affects the label size that the other LayoutManager doesn't do.
Comment 15 Athul Iddya 2018-04-13 20:42:25 UTC
Created attachment 370910 [details]
Empty space on the right with Cantarell at 10 pt
Comment 16 Athul Iddya 2018-04-13 20:44:22 UTC
Created attachment 370911 [details]
Ellipsized text with Cantarell at 12 pt on X11
Comment 17 Athul Iddya 2018-04-13 20:45:27 UTC
Created attachment 370912 [details]
Ellipsized text with Roboto at the default 11 pt on X11
Comment 18 Athul Iddya 2018-04-13 20:46:36 UTC
A variant of this issue can be observed on X too, if the shell font is set to anything other than Cantarell at 11 pt. It looks like the window caption width is always calculated for Cantarell at 11 pt. If the currently selected font requires more space, the text is ellipsized at the end or if it requires less space, empty space is left over on the right.

I have attached screenshots from a fresh install of Fedora 27 to demonstrate the issue.
Comment 19 Strangiato 2018-09-09 20:14:21 UTC
Still valid for Gnome 3.30 on Arch Linux.
Comment 20 Mason Mcbirde 2018-09-22 21:26:23 UTC
I can confirm this issue on my Fedora 27 Gnome 3.28.3!
Check this GitHub issue out for more details:
https://github.com/horst3180/arc-theme/issues/888
Hope to fix soon!
Comment 21 Strangiato 2019-04-05 12:42:16 UTC
This bug persists with Gnome 3.32 on Arch Linux.
Comment 22 Alexandre Franke 2019-11-13 12:56:03 UTC
Still happening with 3.34 (Fedora).
Comment 23 Alexander Mikhaylenko 2020-02-19 10:25:14 UTC
Fixed in https://gitlab.gnome.org/GNOME/gnome-shell/commit/cf52047