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

Scrollbar should be on the right edge when geany is maximized or in fullscreen mode #2361

Open
ghost opened this issue Oct 16, 2019 · 14 comments

Comments

@ghost
Copy link

ghost commented Oct 16, 2019

Hi, currently, there is one pixel gap between the vertical scrollbar and the right edge of the screen when geany is maximized or when in fullscreen mode. This makes it hard to scroll. When the scrollbar is right on the edge, it is very easy to hit with the mouse (the edge acts like "infinitely" wide target). So I would like to ask to remove the gap to enable easy scrolling.

Edit: Talking about Linux version

@elextr elextr added the can't reproduce A developer couldn't reproduce the issue label Oct 16, 2019
@elextr
Copy link
Member

elextr commented Oct 16, 2019

This is a recorded message, please always provide the version of Geany, Glib and GTK (see lines near the top of Help->Debug Messages) and the operating system and version you are using.

WFM (ie full screen == full screen!!) without full details of your system (including window manager in your case) there is nothing anybody can do to help you.

@ghost
Copy link
Author

ghost commented Oct 16, 2019

geany 1.36 (built on 2019-10-05 with GTK 3.24.11, GLib 2.60.7).
Using XFCE desktop environment on gentoo Linux (~amd64).

@ghost
Copy link
Author

ghost commented Oct 16, 2019

How to reproduce: try e.g. firefox - maximize it, open a long page, push the mouse to the right edge, press left mouse button, drag the mouse down - the scrolling works. Try the same with geany - and you cannot just push the mouse cursor to the right side, click and scroll - you have to pinpoint the scrollbar, which is not as easy as simply pushing the mouse cursor to the right.

@elextr
Copy link
Member

elextr commented Oct 16, 2019

Ok, WFM Geany 1.37 (git >= 82590af), en_AU.UTF-8 GTK 3.22.30, GLib 2.56.4 Linux Mint 19.1 Cinnamon.

Might be an XFCE problem.

@ghost
Copy link
Author

ghost commented Oct 16, 2019

No this is most definitely not an XFCE problem. There is simply 1px wide border around the edit area (including scrollbar) which prevents the scrolling on the very right edge.

  1. maximize geany -or- put it in fullscreen mode with F11
  2. push the mouse to the absolute right edge of the screen
  3. try to click to grab the scrollbar - you can't

@elextr
Copy link
Member

elextr commented Oct 16, 2019

firefox - maximize it, open a long page, push the mouse to the right edge, press left mouse button, drag the mouse down - the scrolling works. Try the same with geany - and you cannot just push the mouse cursor to the right side, click and scroll

So its not that Geany doesn't go fullscreen?

The difference between Geany and friedfox is that in Geany the edit widget with scrollbar is in a horizontal pane and your GTK theme has put a very small but not zero width border on the pane. The same happens on the left, a mouse pushed right to the edge won't select a line in the symbols but move it in a few pixels and its fine.

@elextr elextr added gtk-theme and removed can't reproduce A developer couldn't reproduce the issue labels Oct 16, 2019
@ghost
Copy link
Author

ghost commented Oct 16, 2019

Moving this few pixels is what I am talking about - it makes the scrolling not so comfortable. I do not care about the left side that much (the selection area for symbols is quite wide, i.e. easy to hit, compared to the scrollbar). It is always best to have the scrollbar precisely on the right edge, without any "dead" borders. The one pixel of the border makes a lot of difference.

I would say it is not a theme issue. The border is hardcoded in the program, somewhere.

@elextr
Copy link
Member

elextr commented Oct 16, 2019

The Geany UI is made with Glade and is defined in the geany.glade file. There does not seem to be any border or padding hardcoded (outside the preferences dialogs).

On the other hand my themes CSS sets lots of 1px borders.

@codebrainz
Copy link
Member

I'm pretty sure this a GTK+ issue where it hardcodes some bad defaults forcing themes or apps to fix with custom CSS like this Issue. I guess this is the same as this Thunar bug linked from a (possibly) related Mousepad bug.

IMO, such issues should be fixed where they'll have the most effect:

  1. In GTK+, fix all GTK+ apps
  2. Workarounds in the themes (where there are already usually many app-specific hacks), fix all apps when that theme is in use.
  3. Local CSS where each app has to individually fix the issue.

@codebrainz
Copy link
Member

Also looks related to shimmerproject/Greybird#190.

codebrainz added a commit to codebrainz/geany that referenced this issue Oct 17, 2019
Note that the way the selectors are super brittle and could break
with certain preferences or plugins. A better fix would add an ID to
the exact widgets so they can be selected from CSS without the brittle
descendant selecting.
@codebrainz
Copy link
Member

If we went for a local hack (3), something like codebrainz@4d6a914 works, but it should be done properly as noted in the commit message if it's to actually be merged.

@apurkrt if you want to use it now, you could probably just copy the new CSS part from that commit to your ~/.config/gtk-3.0/gtk.css file or patch geany.css accordingly.

@ghost
Copy link
Author

ghost commented Oct 18, 2019

#GeanyMainWindow > box > paned > paned > notebook:last-child { border-right: 0; }
in ~/.config/gtk-3.0/gtk.css works fine, thank you! Now if this just was the default (because I think many people would benefit from this). I agree it would be the best and the most systematic to fix this in GTK+, since this issue occurs in many apps.

@geckolinux
Copy link

@codebrainz @apurkrt Thank you! The local fix does the trick on Plasma. Would be nice to fix this at the core in GTK.

@eechen
Copy link

eechen commented Sep 27, 2022

I met the same problem on Xfce 4.14 (Adwaita Theme).
Maybe it's a GTK+ notebook issue.

You can make all Geany's notebooks (Editor, Symbol list, Message window) scrollbar on the right edge by:
echo "#GeanyMainWindow notebook { border-right: 0; }" | tee -a ~/.config/gtk-3.0/gtk.css

BTW, if you want reduce the size of the statusbar, do this:
echo "#GeanyMainWindow statusbar { margin: -10px 0; }" | tee -a ~/.config/gtk-3.0/gtk.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants