neeeeow / Bluecurve

Red Hat Bluecurve theme for GTK 3
GNU General Public License v3.0
72 stars 4 forks source link

Can't fully maximize GTK4 applications. #11

Closed pablo-888 closed 1 month ago

pablo-888 commented 1 month ago

Is that intentional? there is always (9px? 10px?) of empty space on all sides. GTK3 applications maximize just fine.

gtk4 (made the wallpaper red to make it more clear.)

archlinux with GTK 4.14.5

neeeeow commented 1 month ago

This definitely should not be occurring.

What application are you using the screenshot? Just wondering as I do not have any GTK 4 programs with CSD's installed.

pablo-888 commented 1 month ago

That's GTK-4's widget factory from gtk4-demos (same thing you have in your README screenshots but for GTK4).

I looked around and here seems to be the issue in gtk-4.0/gtk-styles.css:


.background.csd,
window.unified {
    border-width: 0px;
    border-radius: 7px 7px 0 0;
    border-style: solid;
    box-shadow: 0 0 0 1px @wm_border, 0 2px 8px 3px @wm_shadow;
    margin: 10px;
}

If I set "margin" to 0px the problem goes away. Not sure if that breaks anything else though.

neeeeow commented 1 month ago

The margin should be set to 0 for when the window is maximised, but it should be 10px otherwise iirc. I probably messed something up when implementing the GTK 4 theme. I'll investigate this later when I have some time.

neeeeow commented 1 month ago

You were correct in that setting the margin to 0px in the GTK 4 CSD's resolves the issue. I also took the time to fix the CSDs of windows with compositing disabled in GTK 4.

This has been resolved in commit 3f9432f and this patch will be included in the next release.

Thanks for reporting this!