elementary / stylesheet

The GTK Stylesheet for elementary OS
https://elementary.io
GNU General Public License v3.0
321 stars 74 forks source link

Windows: Remove Gtk3-isms and fix Mutter 44 #1254

Closed danirabbit closed 1 year ago

danirabbit commented 1 year ago

Fixes #1253

davidmhewitt commented 1 year ago

Mutter 44 screenshot with this branch:

image

danirabbit commented 1 year ago

@davidmhewitt I'm sure I'll have to do something more invasive to fix those headerbar box shadows etc, but does the latest commit fix the border at least?

alice-mkh commented 1 year ago

Not sure what's up with the padding around header bar...

One thing is I don't know if adwaita currently works well for Mutter - it's not using libadwaita, and I don't think it has any special case for ssd border radius either, so... yay I guess?

davidmhewitt commented 1 year ago

Nope :confused:

image

Adwaita comparison:

image

davidmhewitt commented 1 year ago

And now for some CSS property comparisons, or at least the most relevant looking ones I could fit into screenshots from my VM:

Toplevel `mutter-x11-frames` window node (Adwaita): ![image](https://user-images.githubusercontent.com/3372394/231709457-73e85f94-9bc0-4ebc-87a5-27ef23fe5bcf.png)
Toplevel `mutter-x11-frames` window node (elementary): ![image](https://user-images.githubusercontent.com/3372394/231709634-8ae28dbe-d642-49d5-abbe-1047c2d56e15.png)
`mutter-x11-frames` `MetaFrameContent` node (Adwaita): ![image](https://user-images.githubusercontent.com/3372394/231709903-f9b94221-4885-4fa1-af19-db5a27c6d193.png)
`mutter-x11-frames` `MetaFrameContent` node (elementary): ![image](https://user-images.githubusercontent.com/3372394/231710219-a9a993bd-bf76-4319-9dc3-b64c4e73fb4f.png)
`mutter-x11-frames` `MetaFrameHeader` node (Adwaita): ![image](https://user-images.githubusercontent.com/3372394/231711082-3f0abf4c-9b91-4b5c-b935-b2a77e580324.png)
`mutter-x11-frames` `MetaFrameHeader` node (elementary): ![image](https://user-images.githubusercontent.com/3372394/231711657-3f27a399-6b95-432a-a444-cb13e29e49bb.png)
`mutter-x11-frames` headerbar node (Adwaita): ![image](https://user-images.githubusercontent.com/3372394/231711927-f143be69-0f0b-4fdd-ba0a-509e302bcd8b.png)
`mutter-x11-frames` headerbar node (elementary): ![image](https://user-images.githubusercontent.com/3372394/231712148-e3d30136-2fa5-42b7-bd53-69b985691395.png)
alice-mkh commented 1 year ago

Well, that’s not Adwaita. That’s Default.

Edit: i.e. what I mean is that chances are it's broken in Adwaita too and was copied here. Not sure tho, I never tested that combination (and it was impossible to test until way after that style was last touched, anyway)

davidmhewitt commented 1 year ago

Well, that’s not Adwaita. That’s Default. Edit: i.e. what I mean is that chances are it's broken in Adwaita too and was copied here. Not sure tho, I never tested that combination (and it was impossible to test until way after that style was last touched, anyway)

Hm, for some reason, it doesn't seem to be possible to select Adwaita as a stylesheet in the inspector when you're running it against mutter-x11-frames.

Tbh, I don't even know what the difference between Default and Adwaita are.

alice-mkh commented 1 year ago

Adwaita is a part of libadwaita. The difference:

Screenshot from 2023-04-14 01-46-18 Screenshot from 2023-04-14 01-46-35

Given

Stolen from Adwaita

I'm assuming it was based on the latter.

alice-mkh commented 1 year ago

Any reason to style .titlebar at all? I mean if it's not a header bar, it shouldn't be styled like a header bar then. And if it is, it's already a header bar and there won't be anything nested in there.

danirabbit commented 1 year ago

@Exalm there are some apps that use a box.titlebar with a windowcontrols child because they're inside a paned instead of using a headerbar

alice-mkh commented 1 year ago

Mm, I mean if you want to support that - ok I guess.

danirabbit commented 1 year ago

Yeah it looks like they're just gonna have to eat shit and do something else since there's no other way to get around the padding issue for apps that nest a headerbar inside a .titlebar

alice-mkh commented 1 year ago

In libadwaita we have a variant of header bar where start/end buttons can be hidden independently instead, and in the new widgets that header bar manages buttons automatically.

You could do something similar, so that dual paned apps can just use header bars instead of boxes :)