GTK3 padding added to author padding in buttons is too much

NEW
Unassigned

Status

()

P4
normal
2 years ago
2 years ago

People

(Reporter: mozilla, Unassigned)

Tracking

(Blocks: 1 bug, {regression})

46 Branch
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: tpi:+)

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Created attachment 8747431 [details]
screenshot.jpg

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0
Build ID: 20160421124000

Steps to reproduce:

I have just updated to Firefox 46, which is the first release I've used with gtk3 rather than gtk2. (I use XFCE, so most applications I use are gtk2.) On various pages, there are now errors in the layout that did not occur with gtk2. Most noticeably, the padding of form submission buttons (and other elements such as "select" combo boxes) is now too great. I have gtk-3.14 running on CentOS 7.2, but running Firefox downloaded directly from Mozilla. I use the default Adwaita theme that is built into gtk.


Actual results:

I have attached a screenshot showing the search box on Wikipedia. The two buttons should fit on the same line. Using the Inspector, the computed padding-left and padding-right is 5.73333px for these two buttons, yet the buttons as displayed clearly have more padding than this.

Updated

2 years ago
Blocks: 627699
Component: Untriaged → Widget: Gtk
Product: Firefox → Core
I think ideally, HasAuthorSpecifiedRules(aFrame, NS_AUTHOR_SPECIFIED_PADDING)) should be used to only add GTK padding and return true from nsNativeThemeGTK::GetWidgetPadding() when there is no author-specified padding.
Blocks: 1260061
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Summary: Button padding incorrect in gtk 3.14 → GTK3 padding added to author padding in buttons is too much
Blocks: 1228281
No longer blocks: 1260061
See Also: → bug 1260061

Comment 2

2 years ago
Possibly a duplicate of 1236342?

Comment 3

2 years ago
Edit:

(In reply to Karl Tomlinson (ni?:karlt) from comment #1)
> I think ideally, HasAuthorSpecifiedRules(aFrame,
> NS_AUTHOR_SPECIFIED_PADDING)) should be used to only add GTK padding and
> return true from nsNativeThemeGTK::GetWidgetPadding() when there is no
> author-specified padding.

Isn't this already the case? In my linked report above on my testcase without adding a custom padding the left and right padding are shown as 6px in the Box Model of the Object Inspector. But if I add the attribute 'style="padding-left: 1px; padding-right: 1px;"' the left and right padding are successfully showing 1px and not 7px.
(In reply to sworddragon2 from comment #3)
> In my linked report above on my testcase
> without adding a custom padding the left and right padding are shown as 6px
> in the Box Model of the Object Inspector. But if I add the attribute
> 'style="padding-left: 1px; padding-right: 1px;"' the left and right padding
> are successfully showing 1px and not 7px.

The GTK padding may be in the border rather than the padding, in the object inspector, but I don't actually know whether the inspector sees the gtk padding and border or not.

(In reply to sworddragon2 from comment #2)
> Possibly a duplicate of 1236342?

This bug is about buttons with document author specified padding.
Bug 1236342 has a button without author padding.

Updated

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