Closed
Bug 1022127
Opened 10 years ago
Closed 10 years ago
Context menu separators are black in gtk3 builds
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: glandium, Assigned: acomminos)
References
Details
Attachments
(2 files, 1 obsolete file)
16.49 KB,
image/png
|
Details | |
3.41 KB,
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
See attached screenshot.
Comment 1•10 years ago
|
||
GTK3 and GTK2 use different theme engines and perhaps even different themes. GTK3's default theme uses black menu separators, but that has a grey background (on my system at least), so I assume that is not the theme in the screenshot. It's hard to tell whether this is a bug, without comparing with a context menu in a native GTK3 app. e.g. evince.
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Karl Tomlinson (needinfo?:karlt) from comment #1) > GTK3 and GTK2 use different theme engines and perhaps even different themes. > > GTK3's default theme uses black menu separators, but that has a grey > background (on my system at least), so I assume that is not the theme in the > screenshot. The theme in the screenshot is Adwaita (supposedly the default theme), with no customization, on Debian. > It's hard to tell whether this is a bug, without comparing with a context > menu in a native GTK3 app. e.g. evince. Both roxterm and evince, both using Gtk+3, have a grey separator here.
Assignee | ||
Comment 3•10 years ago
|
||
Here's a patch for this bug that adds the GTK_STYLE_CLASS_SEPARATOR style class to the GtkStyleContext used to draw the menu separators on GTK3, fixing the issue. This uses the same technique as found in the GTK project's gtk_menu_item_draw function.
Attachment #8459378 -
Flags: review?(karlt)
Comment 4•10 years ago
|
||
Comment on attachment 8459378 [details] [diff] [review] Draw menu separators using the GTK_STYLE_CLASS_SEPARATOR style class on GTK3 Thank you. (Perhaps for consistency with gtk_menu_item_draw() and gtk_menu_item_real_get_height(), GTK_STYLE_CLASS_SEPARATOR should be present during gtk_widget_style_get() [and still not during gtk_style_context_get_padding()], but I don't know whether that is necessary. moz_gtk_get_menu_separator_height() would need to be adjusted consistently.)
Attachment #8459378 -
Flags: review?(karlt) → review+
Assignee | ||
Comment 5•10 years ago
|
||
You're right, it's safer to replicate GTK's implementation in case the added style class overrides those values. Attached is an updated patch with modifications to moz_gtk_get_menu_separator_height as well.
Attachment #8459378 -
Attachment is obsolete: true
Attachment #8460028 -
Flags: review?(karlt)
Updated•10 years ago
|
Attachment #8460028 -
Flags: review?(karlt) → review+
Comment 6•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0243d7236450
Flags: in-testsuite-
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0243d7236450
Assignee: nobody → andrew
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•