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
Choose a base branch
from

Conversation

codebrainz
Copy link

@codebrainz codebrainz 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
https://github.com/xfce-mirror/thunar/blob/fe53f759991f3e5df89a4496dc9b353d0560b762/thunar/thunar-statusbar.c#L111

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.

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,
}


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

Choose a reason for hiding this comment

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

Use // comments everywhere

Copy link
Author

Choose a reason for hiding this comment

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

No

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.

None yet

2 participants