bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

[GTK3] less padding in buttons

UNCONFIRMED
Unassigned

Status

()

Core
Widget: Gtk
P4
normal
UNCONFIRMED
2 years ago
2 years ago

People

(Reporter: daniel, Unassigned)

Tracking

(Blocks: 1 bug, {polish})

45 Branch
All
Linux
polish
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: tpi:+)

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Created attachment 8735307 [details]
firefox_gtk_button_width_border.png

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20160304160129

Steps to reproduce:

Look at a <button> in Firefox 45 vs 44. (<input type="submit"> and the like also work.


Actual results:

Button is very wide and has lots of empty space between the button contents and the edge of the button.  Ff45 button is wider than normal GTK button.  Ff44 is smaller than both.


Expected results:

Less wide button.

I think this is related to the change for bug1257811 which adds GTK border sizes to the widget twice:
https://hg.mozilla.org/mozilla-central/file/tip/widget/gtk/gtk3drawing.cpp#l2706
https://hg.mozilla.org/mozilla-central/file/tip/widget/gtk/gtk3drawing.cpp#l2714
The double usage was exposed by bug1257811 when it took the inhtml check out.
(Reporter)

Updated

2 years ago
Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → All

Updated

2 years ago
Blocks: 627699
I think the inhtml check was removed in https://hg.mozilla.org/mozilla-central/rev/3ae71e279abd
but AFAIK the border is only added once.  Border and padding are additive.

How does the new padding compare to that in togglebutton in gtk3-widget-factory, or in the buttons of the "save page" dialog?
I see 1px difference between system button size (28px) and inhtml Firefox button size (29px). System Fedora 22, gtk3-3.16.7.

It may be caused by different font metrics in Firefox, AFAIK we have a bug for that somewhere but I can't find it now.
Depends on: 1269108
No longer depends on: 1269108
See Also: → bug 1269108

Updated

2 years ago
Keywords: polish
Priority: -- → P4
Whiteboard: tpi:+
You need to log in before you can comment on or make changes to this bug.