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 771946 - HeaderBar Label should not hexpand
HeaderBar Label should not hexpand
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-25 17:14 UTC by Daniel Boles
Modified: 2016-10-10 21:59 UTC
See Also:
GNOME target: ---
GNOME version: 3.21/3.22


Attachments
screenshot (38.77 KB, image/png)
2016-09-25 17:14 UTC, Daniel Boles
  Details
math-window.ui: do not expand mode Label, and add spacing between it and arrow (1.17 KB, patch)
2016-09-25 17:25 UTC, Daniel Boles
none Details | Review
math-window.ui: remove redundant halign=baseline on the mode Label (898 bytes, patch)
2016-09-25 17:26 UTC, Daniel Boles
none Details | Review
math-window.ui: do not expand mode Label, and add spacing between it and the down-arrow (1.36 KB, patch)
2016-09-25 17:35 UTC, Daniel Boles
committed Details | Review
math-window.ui: remove redundant halign=baseline from mode Label (959 bytes, patch)
2016-09-25 17:36 UTC, Daniel Boles
committed Details | Review

Description Daniel Boles 2016-09-25 17:14:07 UTC
Created attachment 336217 [details]
screenshot

The Label showing the current mode in the HeaderBar (titlebar) has hexpand set. This was not previously honoured because HeaderBar did not support expanding children. However, as of GTK+ 3.22, it does, and this means that now the label expands to fill the available space in the titlebar.

The result is that we end up with a really wide 'dropdown' (actually Popover!) in the titlebar. This looks strange (when highlighted or dragging the window) and pushes the associated down-arrow image away from the text, so it doesn't look like drop-downs (e.g. ComboBox) and is not obviously a drop-down widget.

I'll attach a screenshot showing the extreme case of this, in Programming mode.

Patch on the way (unless Lapo beats me to it. :D)

HTH and thanks!
Comment 1 Daniel Boles 2016-09-25 17:16:04 UTC
Also, the halign=baseline property on the Label appears not to do anything, and the Inspector shows it gets GTK_ALIGN_FILL at runtime. I think while making changes in that area, it might be prudent to remove that, unless it has some hidden purpose I'm missing...
Comment 2 Daniel Boles 2016-09-25 17:25:28 UTC
Created attachment 336218 [details] [review]
math-window.ui: do not expand mode Label, and add spacing between it and arrow

This fixes the problem of the Label being overly wide, and the immediately following problem of it and the arrow now being too close together.
Comment 3 Daniel Boles 2016-09-25 17:26:49 UTC
Created attachment 336219 [details] [review]
math-window.ui: remove redundant halign=baseline on the mode Label

This does not seem to be used, as the Inspector shows that the Label gets GTK_ALIGN_FILL anyway.
Comment 4 Daniel Boles 2016-09-25 17:35:47 UTC
Created attachment 336223 [details] [review]
math-window.ui: do not expand mode Label, and add spacing between it and the down-arrow

add this bug url
Comment 5 Daniel Boles 2016-09-25 17:36:31 UTC
Created attachment 336224 [details] [review]
math-window.ui: remove redundant halign=baseline from mode Label

add this bug url
Comment 6 Lapo Calamandrei 2016-09-25 20:30:37 UTC
I thinkhaving the downarrow so far aparr from the label, makes it less discoverable that you can click the label for mode switching. As a bonus it looks better.
Comment 7 Robert Roth 2016-10-10 20:03:34 UTC
Attachment 336223 [details] pushed as c45961d - math-window.ui: do not expand mode Label, and add spacing between it and the down-arrow
Attachment 336224 [details] pushed as 1d44d6b - math-window.ui: remove redundant halign=baseline from mode Label
Comment 8 Daniel Boles 2016-10-10 21:59:08 UTC
Thanks again Robert, glad I could help!