I'm not sure how others but I personally just HATE the huge status bar of GTK 3. It's such a colossal waste of precious vertical space and not making the height adjustable is a terrible design choice IMO.
Anyway, end of ranting, the GTK status bar is just a GtkBox and a label (plus some message stack that Geany doesn't even use) so it's no problem to replace the statusbar with these and set the height to a sane amount of pixels.
To me, the result is MUCH better and from the themes I tried, it looks the same like the original status bar (apart from the height of course).
There might be a problem with plugins that try to access the status bar directly and don't use msgwin_status_add(). The only plugin that seems to do that (correctly) is the "web helper" plugin but from the code it appears it falls back to creating a fake status bar if it doesn't locate the one from Geany so it won't crash.
What do you think? You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3058
-- Commit Summary --
* Make status bar thinner by using GtkBox instead of GtkStatusBar
-- File Changes --
M data/geany.glade (18) M src/libmain.c (2) M src/ui_utils.c (39) M src/ui_utils.h (3)
-- Patch Links --
https://github.com/geany/geany/pull/3058.patch https://github.com/geany/geany/pull/3058.diff
@techee pushed 1 commit.
1e601e33920ebe30c4460d94192537fb9cfaaad1 Make status bar thinner by using GtkBox instead of GtkStatusBar
I'm not sure how others but I personally just HATE the huge status bar
of GTK 3.
???????????? what huge statusbar ??????????????
not making the height adjustable is a terrible design choice IMO.
geany.css:
``` statusbar { padding: 0; } ```
statusbar { padding: 0; }
If only it were so simple. No, this doesn't work (Debian, xfce). Check for instance
https://github.com/codebrainz/Greybird/commit/96e8cd2002d814f1592ff5bd86c91b...
but the change from the above commit doesn't work for me either. The problem is that you don't even know whether some of the workarounds for the status bar were applied so subtracting some extra value might make it too small on some machines.
Totally bypassing the stupid GtkStatusbar is IMO the safest thing to do.
Totally bypassing the stupid GtkStatusbar is IMO the safest thing to do.
Switching to a sensible system is the safest thing to do, as I said it works here, no reason to change it.
Both padding and margin can be set by css and margin set to negative values to squish it even further.
``` (null): Geany INFO : Geany 1.39 (git >= b7558417), en_AU.UTF-8 (null): Geany INFO : GTK 3.24.20, GLib 2.64.6 (null): Geany INFO : OS: Linux Mint 20 (ulyana) ```
Geany should not be fixing broken systems by re-implementing existing widgets, fix your system instead.
The fact that it works with your particular system isn't a reason not to fix it on all systems. And there are lots of people experiencing this, see #2513 and the linked github issues or
https://stackoverflow.com/questions/61765128/without-installing-new-plug-ins...
The reply has been everywhere what you just said, basically not our issue, fix your system, but there's no way to fix it. So people were either using GTK 2 (my case, did this until it was possible, and I think the screenshot from @eht16 was coming from a GTK2 version of Geany in #2513), or maybe using Cinnamon (but I just want to use something lightweight in my virtual machine not to consume too many resources). And this isn't a theme bug - it's idiotic GTK 3 decision to hard-code this value for all applications.
fix your system instead
So tell me and others how.
OK, it seems to be possible to set the statusbar height when editing the theme directly and setting negative values - sadly, this doesn't work when editing geany.css.
I still think that users shouldn't be required to edit their themes to workaround the stupid GTK defaults though - Geany should look good out of the box (similar reason why I wanted to change the default colors). Not only this will improve user experience, it will also reduce the amount of "stupid" (which aren't so stupid though) bug reports.
OK, it seems to be possible to set the statusbar height when editing the theme directly and setting negative values - sadly, this doesn't work when editing geany.css.
Perhaps some info would be useful, what GTK are you using? What desktop? What theme?
As I said setting a negative margin in `geany.css` shrinks the statusbar for me:
```css statusbar { margin: -5px; } ```
so why does it not work for you?
6px / 10px margin is directly included in ui file for standard statusbar ( [gtkstatusbar.ui](https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/ui/gtkstatusbar.ui) ).
@intact yes, that is part of the conversation linked [above](https://github.com/geany/geany/pull/3058#issuecomment-997297134). And when looking _closely_ at my statusbar it is padded maybe about 10px see below.
Default statusbar here:
![Screenshot from 2021-12-20 11-19-55](https://user-images.githubusercontent.com/811085/146698843-1f36265d-c3f7-4f6...)
which does indeed have about 10px margin, but on my screen thats not a lot of space so I hadn't noticed it was padded.
With the addition of the 3 lines from post above:
![Screenshot from 2021-12-20 11-18-56](https://user-images.githubusercontent.com/811085/146698832-34a78716-dba2-490...)
it has shrunk.
So this shows several things:
1. even with the padding it depends on screen resolution if its noticable much, with my mid resolution monitor (not a 4k or "retina" screen) it does not seem "huge" (to quote the OP). In fact it is about the same height as a normal edit line now that has been corrected to show underlines. So it is not necessary to force a mandate of a shrink for all users just because one is unhappy with their system defaults.
2. it can be shrunk with geany.css here, so why does it not work for @techee, seems his system is the one thats broken, but AFAICS he hasn't actually provided any details on system, or GTK versions, or desktop, or theme etc. Try to find why it does not work before breaking Geany.
3. The project has taken the decision delegate theming to the desktop themes. I do not agree with that decision, but its the one that was made, and it can be overridden by `geany.css`. So we should not be diving for code to enforce an override when we dislike some default theme and break the contract we have with our users.
OK, I must be stupid, tried it again and it works - perhaps I just made some syntax error in the css, I don't know. Since this works, what about doing the following - adding the following lines to default `geany.css`:
``` /* use the following to reduce the size of the statusbar if needed */ /* statusbar { margin: -6px 0; } */ ```
This would be commented-out by default because we don't know about what the theme does on user's system but this would make it easier to discover how to reduce the size of the statusbar for users. What do you think?
This would be commented-out by default because we don't know about what the theme does on user's system but this would make it easier to discover how to reduce the size of the statusbar for users. What do you think?
Sure, can't hurt to provide guidance. Maybe say "Uncomment the following to ..." rather than just "use".
Closing in favor of #3061.
Closed #3058.
I'm a little late to the party but want to add two things anyway: - JFTR, the mentioned screenshot I made was with GTK2 (as @techee assumed) - thank you for the change in #3061, the default of `-6px` worked perfectly on my system (Debian+Xfce) and makes me very happy
Note I believe the default padding is removed in GTK4, but thats a problem for future Geany.
Note I believe the default padding is removed in GTK4, but thats a problem for future Geany.
The css code is commented out by default so it's not such a problem.
github-comments@lists.geany.org