Open Bug 1850827 Opened 1 year ago Updated 10 months ago

Implement rounded bottom corners

Categories

(Core :: Widget: Gtk, enhancement)

enhancement

Tracking

()

REOPENED
119 Branch
Tracking Status
firefox119 --- affected

People

(Reporter: rmader, Assigned: emilio)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(3 files, 2 obsolete files)

We already do that on other platforms and GTK-land has moved to the direction as well.

Attached image Screenshot from 2023-08-30 22-25-24.png (obsolete) —

Okay, so I took a look and rebased the patch. Ironically, the Adwaita Gtk3 theme doesn't have bottom corners, so that's why that border shows up. More ironically, this works with Breeze and improves the rendering there :)

The thing is, we can't know if the current gtk theme has bottom rounded corners. The right thing to do would be to query the border-bottom-right/left-radius in the CSD node of the window. That's what GTK does here. But those properties aren't exposed, so we can just query border-radius as a whole, and that just returns the top left radius here...

So unless there's somehow a way to override this (maybe there is... a custom CSS provider or so?) I don't think there's an easy way to do this...

Assignee: nobody → emilio
Attachment #9351347 - Attachment description: WIP: Bug 1850827 - Rounded bottom corners → Bug 1850827 - Implement rounded bottom corners in GTK. r=stransky,rmader
Status: NEW → ASSIGNED

This makes the rounded bottom corners work on X11, and makes the top
corner drawing less insane.

Depends on D187343

Duplicate of this bug: 1743981
Attachment #9350926 - Attachment is obsolete: true

This looks almost perfect to me, thanks a lot! The only issue I see on Gnome is a slight misalignment of the black border and the transparent area, both at the bottom and at the top. At the bottom it's just a bit more visible IMO.

I attached a screenshot for more easy reasoning.

Attachment #9350927 - Attachment is obsolete: true

Is the one at the top a new thing with these patches or do you see it without them too?

Flags: needinfo?(robert.mader)

(I can't reproduce comment 9 neither on mutter nor kwin fwiw, looks perfect here)

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

Is the one at the top a new thing with these patches or do you see it without them too?

  • The top part is also visible in nightly, but only catches my eye when using dark mode (so the title bar color is dark) and over light background. It's easy to miss over dark background and doesn't appear to be a big deal.
  • The bottom part is easily visible - but so far I could only reproduce it on https://www.mozilla.org/en-US/firefox/nightly/firstrun/ :)

Tested on two different machines - both dark-mode, one text-scale-factor 1.25 (the other 1.0).

Flags: needinfo?(robert.mader)
Blocks: 1851651
Keywords: leave-open
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a7ce0ac3a970
Implement rounded bottom corners in GTK. r=rmader
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7b7144975b31
Simplify how we draw window decorations. r=stransky,rmader,desktop-theme-reviewers,dao
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
See Also: → 1851931
Regressions: 1852084
Target Milestone: --- → 119 Branch
Regressions: 1852583
Regressions: 1852584

Reopening because of scrolling perf regressions (bug 1852584).

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Regressions: 1852915
Blocks: 1852659
Depends on: 1854351
Depends on: 1854360

It seems that rounded corners disappears when visiting a website with blurred elements.

Example: https://build.archlinuxcn.org/~auxiliarypower/map.html

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: