linuxmint / muffin

The window management library for the Cinnamon desktop (libmuffin) and its sample WM binary (muffin)
GNU General Public License v2.0
197 stars 93 forks source link

[Feature] Rounded corners on all windows #652

Open radical4ever opened 1 year ago

radical4ever commented 1 year ago
 * muffin version (muffin --version or 'dpkg --list | grep libmuffin0' for Mint/Ubuntu)
 * Distribution - (Mint 17.2, Arch, Fedora 25, etc...)
 * Graphics hardware *and* driver used
 * 32 or 64 bit

Request Make rounded corners be applied to all windows, so in that way apps look more consistent each other

Other information There is this proyect Here that makes all windos rounded for gnome desktop, but os it possible to make it for muffin, thank you

neliavaal commented 1 year ago

This would be so great!

neliavaal commented 1 year ago

https://github.com/linuxmint/cinnamon/issues/7530

radical4ever commented 1 year ago

Well, in a point they're dealing the same issue as i opened, but i think is not rlly a theming issue but a window manager issue, that's why i opened here

GingerGigiCat commented 9 months ago

I have proof that this is in fact possible, the cinnamon extension "Cinnamon Maximus" enables you to remove the titlebar of windows, in turn making the top corners of the window rounded. Spotify before removing titlebar: image

After removing titlebar: image

Surely it can't be hard to do the same thing to the bottom corners automatically?

mfreeman72 commented 4 months ago

Windows, MacOS, KDE (with https://github.com/matinlotfali/KDE-Rounded-Corners), and Gnome (with CSD, libhandy, libadwaita, https://github.com/Spirrwell/mutter-rounded, etc.) all have the ability to round-off all four corners of their windows, and it works and is beautiful. Why couldn't we have that option, too?

mfreeman72 commented 2 months ago

Since Muffin is based on Mutter, could something like the mutter-rounded fork be done with Muffin as well (leaving out the blur feature, which has been the major problematic part of that project - although that would be cool as well, if perfected)? Something like this screenshot from the mutter-rounded github page would look so amazing in Cinnamon: https://github.com/Spirrwell/mutter-rounded/blob/main/screenshots/screenshots0.jpg

As far as the complaint that rounding the bottom corner would cut off important content (as seen in https://github.com/linuxmint/cinnamon/issues/7530), I was thinking about that a bit. To be cut off, that content would have to exist within 1/2 of the curve radius from the corner. Most radius sizes I've seen in themes using rounded corners are between 5 and 10 pixels. So that would mean content would have to be completely within 2 to 5 pixels of the absolute corner of the window for this to be an issue. In general, all window content I've seen has had a padding around it of 5 pixels or more, and controls, which do usually stick right to the edge of the window, would be terrible if they were much less than 15 pixels across, either vertically or horizontally. So I don't see how rounding corners could realistically be a problem, content-wise.

JosephMcc commented 2 months ago

@mfreeman72 Where you would find an issue is things like scrollbars. Many apps have scrollbars right against the window edge. Including Firefox where I would have the issue right now on Github. This would be even worse if the scrollbars have arrows and some toolkits still have that. Many of the people who want this want things like you see in libadwaita. The corner radius there is at least 12px if I remember correctly.

neliavaal commented 2 months ago

why wouldn't it work in muffin?? image

the scrollbar is fine same for the round bottom corners

mfreeman72 commented 2 months ago

@mfreeman72 Where you would find an issue is things like scrollbars. Many apps have scrollbars right against the window edge. Including Firefox where I would have the issue right now on Github. This would be even worse if the scrollbars have arrows and some toolkits still have that. Many of the people who want this want things like you see in libadwaita. The corner radius there is at least 12px if I remember correctly.

@JosephMcc I still don't see the problem. Even with a 12px radius, you'd need your scrollbar to be unusably small before the round corner would become too much of a problem. With the main Linux Mint themes, the scrollbar is at least 12px wide when in use, and the corner radius is about 6px. That means that only a few pixels would be cut away from the scrollbar area, which hardly cuts into the padding around the scrollbar (as seen in neliavaal's image). With libadwaita, there is even more padding around the scrollbar, again making the rounded corner not impact the scrollbar at all, but even if it didn't have that amount of padding and a 12px radius, the curve only cuts in about 6 pixels from the corner, meaning extremely little of the scrollbar would be affected, if any. And if there was an arrow control there, even with a 12px radius, the arrow control button at 12 to 15 pixels square (which seems to be a pretty common size in most themes), would still be mostly visible. And since most themes don't include arrow controls anymore, I imagine very few people even pay attention to the arrow controls, let alone actually use them. Most use the scrollbar or the mouse wheel, neither of which would be impacted by the rounded corner. So I really don't see the problem here.

GingerGigiCat commented 2 months ago

Yes, rounded corners wouldn't interfere with the scrollbar.

It shouldn't be a question of why we should or shouldn't support rounded corners, we should be asking why it hasn't been added yet and how to support it.

mtwebster commented 2 months ago

It shouldn't be a question of why we should or shouldn't support rounded corners, we should be asking why it hasn't been added yet and how to support it.

mfreeman72 commented 2 months ago

@mtwebster Since Muffin is based on Mutter, would it be possible to modify the mutter-rounded patch (https://github.com/Spirrwell/mutter-rounded) to do something similar in Muffin? Or are the code bases too different for that to be a possibility? If the code bases are close enough for a patch like that to work, perhaps most of the coding work has already been done, or at least enough to give us a direction to pursue, in case a volunteer wants to step up and code the thing for you? I really don't know, not knowing what the differences are. It was just a hopeful thought. :)

GingerGigiCat commented 2 months ago

The mutter-rounded patch is, as far as I'm aware, outdated and unmaintained. However, the original developer has pivoted to developing it as a gnome extension, which I am slowly and dodgily trying to port to cinnamon. Is there an easier way to port a gnome extension to cinnamon than just going through all the files, trying to make them compatible?

neliavaal commented 2 months ago

check this out guys!!! it's beautiful..

image

GingerGigiCat commented 2 months ago

How did you do it?

neliavaal commented 2 months ago

How did you do it?

It's zorin theme on mint.

mfreeman72 commented 2 months ago

The mutter-rounded patch is, as far as I'm aware, outdated and unmaintained. However, the original developer has pivoted to developing it as a gnome extension, which I am slowly and dodgily trying to port to cinnamon. Is there an easier way to port a gnome extension to cinnamon than just going through all the files, trying to make them compatible?

@GingerGigiCat I figured that since Muffin is based on Mutter 3.36, while mutter-rounded supports up to Mutter 42.2, that it would be at least somewhat feasible to adapt it to our purposes. A starting point, at least.

mfreeman72 commented 2 months ago

How did you do it?

It's zorin theme on mint.

@neliavaal Could you give us a step-by-step on this? The only references I can find to applying the Zorin theme to Mint show squared bottom corners. The image you put up looks like you somehow applied libadwaita to Mint-specific software. What was your process to achieve this? Or was this a mock-up?

neliavaal commented 2 months ago

@mfreeman72 nothing extraordinary I've just applied zorin theme from the themes selection. It works only for some apps as you can see

image

mfreeman72 commented 2 months ago

I see. I didn't realize the Mint welcome screen wasn't just basic GTK3.