Closed Bug 1324886 Opened 7 years ago Closed 7 years ago

GTK3 pre 3.8 menuitem separators rendered bizarrely when wide-separators is set

Categories

(Core :: Widget: Gtk, defect, P1)

53 Branch
x86
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla53
Tracking Status
firefox52 --- unaffected
firefox53 --- fixed

People

(Reporter: mozilla, Assigned: karlt)

References

Details

(Keywords: regression)

Attachments

(3 files)

Attached image Separators
User Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20160905130425

Steps to reproduce:

1. Use GTK3 before 3.20 (3.4 works well)
2. Get a theme with wide-separators set (I have the separator-height at 2 here)
3. Make sure padding is zero or the frame details will be obscured.
4. Open a menu with separators (eg. Firefox main edit menu)


Actual results:

The separators are drawn twice, once as a plain separator and once as a frame around the area of the separator. See attached image. I think the frame is drawn around an area the size of separator-height, but should be drawn to be separator-height including the width of the border.


Expected results:

In other applications (eg. gThumb and gedit) the expected 2px solid black line is shown, or a single plain frame if the separator-height is bigger. This is a recent regression, possibly since bug 1287036.
Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86
Because upgrading to 3.4 solves this issue, this is probably a wontfix on Mozilla's side. However, I'm not sure what our support level is for various versions of GTK. Going to let engineering make the call.
Perhaps I should clarify my words. GTK 3.4 works well for showing the problem :) The screenshot I posted is from a 3.4 system. There is no problem in 3.20, or at least not this problem. I haven't tested every minor version in between but suspect it is there in everything up to 3.18. This particular test setup is designed to showcase the issue by clearly showing the two separate rendered sections. In most themes using wide-separators, the symptoms would be a previously sharp separator (eg. a sliced border image) showing as a thick blurred splodge.
Thanks for the report.  Prior to 3.8, the menu item frame was drawn only when there was a child (i.e. not a separator menu item) and only when GTK_STATE_FLAG_PRELIGHT is set.

https://git.gnome.org/browse/gtk+/tree/gtk/gtkmenuitem.c?h=3.6.5#n1722
https://git.gnome.org/browse/gtk+/tree/gtk/gtkmenuitem.c?h=3.8.9#n1653
Assignee: nobody → karlt
Blocks: 1287036
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: GTK3 pre 3.20 menuitem separators rendered bizarrely when wide-separators is set → GTK3 pre 3.8 menuitem separators rendered bizarrely when wide-separators is set
There is a similar regression in regular menu items due to the frame being drawn even when not in hover state.
Priority: -- → P1
Sure, looking at it. The most difficult part seems to be to build Firefox on Ubuntu 12.04 :)
Comment on attachment 8823414 [details]
bug 1324886 with GTK versions < 3.8 draw menuitem background and frame only when in hover and not a separator

https://reviewboard.mozilla.org/r/101938/#review103314

Looks fine, Thanks.
Attachment #8823414 - Flags: review?(stransky) → review+
Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/678233880a0f
with GTK versions < 3.8 draw menuitem background and frame only when in hover and not a separator r=stransky+263117
https://hg.mozilla.org/mozilla-central/rev/678233880a0f
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Looks good now in nightly, a close match to other GTK3 apps.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: