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

Fix the huge default margins in GTK+3 statusbar #248

Draft
wants to merge 1 commit into
base: master
from

Conversation

@codebrainz
Copy link

commented Aug 3, 2019

This is hardcoded in the UI file:
https://github.com/GNOME/gtk/blob/gtk-3-22/gtk/ui/gtkstatusbar.ui#L6

So the default margins have to be subtracted from the desired margin.

This is inspired by how the Canta theme fixes it:
https://github.com/vinceliuice/Canta-theme/blob/db96a1e27e131e4a0fad1e7e2b656179db46b5e8/src/_sass/gtk/apps/_mate.scss#L286

The large size results in various bug reports and issues like:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=456345
zim-desktop-wiki/zim-desktop-wiki#342
geany/geany#1825
https://unix.stackexchange.com/questions/271042/gtk3-statusbar-height

And C-based fixes like:
https://git.xfce.org/apps/ristretto/commit/?id=289329

I've read that this has been fixed in Cinnamon and Unity themes, presumably in a similar fashion, but I don't have any of those to test.

It seems like a bad fix for every individual application to be forcing the margins to zero in C code, which is why I made this PR here. At least it would fix all XFCE apps with the default theme.

NOTE: This isn't tested, I don't know much about SASS, and I'm not sure that 2px is the best value, I just wanted to see if something could be done about the large status bar.

Fix the huge default margins in GTK+3 statusbar
This is hardcoded in the UI file:
https://github.com/GNOME/gtk/blob/gtk-3-22/gtk/ui/gtkstatusbar.ui#L6

So the default margins have to be subtracted from the desired margin.

This is inspired by how the Canta theme fixes it:
https://github.com/vinceliuice/Canta-theme/blob/db96a1e27e131e4a0fad1e7e2b656179db46b5e8/src/_sass/gtk/apps/_mate.scss#L286

The large size results in various bug reports and issues like:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=456345
zim-desktop-wiki/zim-desktop-wiki#342
geany/geany#1825
https://unix.stackexchange.com/questions/271042/gtk3-statusbar-height

And C-based fixes like:
https://git.xfce.org/apps/ristretto/commit/?id=289329

I've read that this has been fixed in Cinnamon and Unity themes,
presumably in a similar fashion, but I don't have any of those to test.
@@ -1326,6 +1326,15 @@ searchbar,
}


/***************

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Aug 3, 2019

Use // comments everywhere

This comment has been minimized.

Copy link
@codebrainz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.