Closed Bug 1424926 Opened 6 years ago Closed 6 years ago

Remove bogus padding from window control buttons

Categories

(Core :: Widget: Gtk, enhancement)

All
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: dao, Assigned: stransky)

References

Details

Attachments

(1 file, 1 obsolete file)

The default padding is partly responsible for messing up the button rendering on Ubuntu.
Comment on attachment 8936459 [details]
Bug 1424926 - Remove bogus padding from window control buttons.

https://reviewboard.mozilla.org/r/207170/#review213084

Unfortunatelly that removes all padding which is IMHO incorrect. We need to get correct padding from Gtk style and export that for headerbar button as chromium does for titlebar buttons:

https://chromium.googlesource.com/chromium/src/+/master/chrome/browser/ui/libgtkui/nav_button_provider_gtk3.cc

As a workaround I suggest to update padding for headerbar button at toolkit level:
https://dxr.mozilla.org/mozilla-central/rev/a461fe03fdb07218b7f50e92c59dde64b8f8a5b0/widget/gtk/gtk3drawing.cpp#2295
Attachment #8936459 - Flags: review?(stransky)
Comment on attachment 8936459 [details]
Bug 1424926 - Remove bogus padding from window control buttons.

https://reviewboard.mozilla.org/r/207170/#review213084

Hm, I'll check if nsNativeThemeGTK::GetWidgetPadding() is also involved here.
Assignee: dao+bmo → nobody
Status: ASSIGNED → NEW
Component: Theme → Widget: Gtk
Priority: P1 → --
Product: Firefox → Core
This is IMHO what you want at toolkit level, GetWidgetPadding() returns 0 padding for header bar buttons and also returns true to indicate that CSS padding should not be used:

https://dxr.mozilla.org/mozilla-central/rev/a461fe03fdb07218b7f50e92c59dde64b8f8a5b0/gfx/src/nsITheme.h#106
Comment on attachment 8936546 [details]
Bug 1424926 - does not apply CSS padding to header bar buttons,

https://reviewboard.mozilla.org/r/207278/#review213090
Attachment #8936546 - Flags: review?(dao+bmo) → review+
Assignee: nobody → stransky
Attachment #8936459 - Attachment is obsolete: true
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/b39d2c5e5163
does not apply CSS padding to header bar buttons, r=dao
https://hg.mozilla.org/mozilla-central/rev/b39d2c5e5163
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: