Closed Bug 1737676 Opened 3 years ago Closed 3 years ago

Use native GTK menu radius.

Categories

(Core :: Widget: Gtk, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file)

No description provided.

The patch above works nicely on all the GTK themes I've tried except Yaru for some reason. But I think it should work because Yaru has a rule like:

  .csd menu, .csd .menu, .csd .context-menu {
    border: none;
    border-radius: 4px; }

Do you know why it might not be working as expected there, or how can I debug it further? GTK_DEBUG=interactive doesn't seem to show the WidgetStyleCache widgets.

Flags: needinfo?(stransky)

I made it work by falling back to the decoration style, but not sure if that's acceptable or not, didn't quite figure out why it didn't work out of the box.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)

I made it work by falling back to the decoration style, but not sure if that's acceptable or not, didn't quite figure out why it didn't work out of the box.

I think this is the correct approach - we use the same way to do header bar styles. I recall the direct style assignment you used at CreateWindowWidget() doesn't work as expected for gtk > 3.20 due to style rework (AFAIK styles from widgets are not used to create the css selector or so).

Flags: needinfo?(stransky)

So it looks correct to me but just check actual window setup (csd/solid-csd) and don't use radius with solid-csd (set to 0 ?).

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f533a2776f76
Use GTK menu radius on native context menus and panels. r=stransky
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: