Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Apr 22, 2023
Merged

Conversation

danirabbit
Copy link
Member

Fixes #1253

@davidmhewitt
Copy link
Member

Mutter 44 screenshot with this branch:

image

@danirabbit
Copy link
Member Author

@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
Copy link
Contributor

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
Copy link
Member

Nope 😕

image

Adwaita comparison:

image

@davidmhewitt
Copy link
Member

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

Toplevel `mutter-x11-frames` window node (elementary):

image

`mutter-x11-frames` `MetaFrameContent` node (Adwaita):

image

`mutter-x11-frames` `MetaFrameContent` node (elementary):

image

`mutter-x11-frames` `MetaFrameHeader` node (Adwaita):

image

`mutter-x11-frames` `MetaFrameHeader` node (elementary):

image

`mutter-x11-frames` headerbar node (Adwaita):

image

`mutter-x11-frames` headerbar node (elementary):

image

@alice-mkh
Copy link
Contributor

alice-mkh commented Apr 13, 2023 via email

@davidmhewitt
Copy link
Member

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
Copy link
Contributor

alice-mkh commented Apr 13, 2023

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
Copy link
Contributor

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
Copy link
Member Author

@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
Copy link
Contributor

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

@danirabbit
Copy link
Member Author

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
Copy link
Contributor

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 :)

Copy link
Member

@davidmhewitt davidmhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this resolves the issues on Mutter 44 and the issue I was seeing with Torrential. And I'm not noticing any regressions anywhere after using this branch for a bit.

But take my approval with a pinch of salt as I'm not the best at CSS or spotting minor things 😅

@danirabbit danirabbit merged commit 724ee19 into master Apr 22, 2023
3 checks passed
@danirabbit danirabbit deleted the windows-mutter44 branch April 22, 2023 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Window margins cause titlebar issues in Mutter 44
4 participants