firefox-csshacks icon indicating copy to clipboard operation
firefox-csshacks copied to clipboard

Update window_control_placeholder_support.css to account for number of buttons when using GTK window controls

Open pettycrimes420 opened this issue 1 year ago • 3 comments

Replace -moz-gtk-csd-available check with separate conditions for each button and set --uc-window-control-width according to the number of buttons available. This is done to adjust layout to GNOME's titlebar buttons settings including the default which has only close button enabled

pettycrimes420 avatar Jan 15 '24 14:01 pettycrimes420

This is definitely what we should do, except that surely the width can't be 0px when there is one button there, and 40px if there is two.

Until now I've used 84px for three buttons, so I'd guess that sane values would be 28px, 56px and 84px or something along those lines.

MrOtherGuy avatar Jan 15 '24 15:01 MrOtherGuy

I kinda thought so myself with 0px but for some reason it seems to work (1st screenshot) though I don't exactly know why 0px

28px might be a bit wide 28px

And also tried 9px which ended up looking the closest to what gtk4 has 9px Screenshot from 2024-01-15 18-16-19

pettycrimes420 avatar Jan 15 '24 17:01 pettycrimes420

The second image actually looks as intended.

The buttons are supposed to be separated from the menu by width defined by --uc-window-drag-space-post in window_control_placeholder_support.css. It's purpose is to create space close to window controls where you can drag window from. This kind of space exists in tabs toolbar as well and we want it to exist even if tabs toolbar itself is gone.

But yes you can just set that variable to 0px if you don't want such space.

MrOtherGuy avatar Jan 15 '24 19:01 MrOtherGuy

Hey, just to let you know, I did (finally) add support for variable number of caption buttons in the latest patch. So, I'm closing this pull request as it's no longer relevant. Thanks for the idea though!

MrOtherGuy avatar Jul 27 '24 07:07 MrOtherGuy