Scroll bars too wide

Gramps 5.1.6 on up to date Manjaro linux. Gramps in windows has narrow scroll bars, but in linux they are very wide. I can’t find a way to change them to the thinner width especially the bottom bar which covers the last line of the index so you can’t select it.

Wikipedia site suggests that they have several different desktops, like Gnome, KDE, and Xfce. Which of these do you use?

Changing themes can also help, and there is a GTK setting for scroll bars too.

Thickness of scrollbars is controlled by the code in the GTK css files.

Gramps on Windows uses a GTK theme specific to Gramps. The default is Adwaita. Gramps on Linux is using the overall OS GTK theme.

There is the addon Themes that allows Windows users to choose/use other themes. There is a note about options available to Linux users.

The alternative is to hack the theme css files.

1 Like

There are several articles about this on the web, like this one:

And a quick way to check whether these settings work is to type

GTK_OVERLAY_SCROLLING=0 gramps

in terminal.

When I do that, the scroll bars are always visible when the viewport is smaller than the view itself, so that they don’t overlap anything else.

I just tried the following:

scrollbar * {
  min-width: 10px;
}
scrollbar:hover * {
  min-width: 20px;
}

It sets the scrollbar width to 10 pixels increasing to 20 pixels when you hover over it.

On the GRAMPS for Genealogists Facebook group, it is correctly noted:

one of the problems starting to “customize” GTK on Windows is that you are in risk of ruin other GTK software you use on the same machine…

I had to do a total reinstall of Windows 2 years ago because I started to tweak GTK themes, even with backups and restoring, two of the other software I used that happened to use the same GTK version as Gramps would not restore, I never managed to figure out why, so only way was to “restore” them, even after multiple uninstalls and clean ups of Gramps and all the other software I had installed that used GTK, was to reinstall Windows…

Actually it was a reset because I used hyper-v, but still… LOTS of problems… lucky for me, I didn’t do this on my main and “live” workstation where I have 4-5 other open source software using GTK.

Just a kind warning…

Since these are Cascading style sheets, perhaps our themes add-on could benefit from having a selection of a customized CSS sheet override(s) on top of the base theme?

That way our Gramps customizations would not affect other applications by directly modifying the shared base theme.

We could embed a link reference to a base CSS theme in the header of our customization overriding CSS file. Then it would inherit the stylings of the evolving base theme.

But that locks you into that particular base sheet. So it requires a manual edit if you want to explore other appearances without losing the hacks that compensate for GTK idiosyncrasies.

I’m considering creating a gramps.css file for the v5.2 release. I’ve created some lozenge shaped labels for the new Addon Manager which could be customised in a style sheet.

Don’t modify the base theme. Create a new file with your modifications.

2 Likes

The wiki articles will need revising to promote that strategy. And desperately need a rewrite to be more understandable. (That’s a ToDo list item for WikiContributors, not the Developers. I’ll file the Enhancement Request.)

There is no need to modify anything in style sheets, although you’re of course free to do so, if you like taking risks.

The solution that I found is much simpler, because it just tells GTK to stop hiding the scroll bars when the mouse is out of sight. Scroll bars will then always be visible, if there is more information than would fit in the window, and the content will be resized automatically, so that there’s no conflict when the scroll bar suddenly appears where you like to clcik.

All you need to achieve this is to add the line

gtk-overlay-scrolling=false

to the ~/.config/gtk-3.0/settings.ini file.

And that’s a file that you need to change anyway, if you see that clicking above or below the thumb does not page up or down, but warps to the place where you clicked, which was a change I never asked for, some years ago.

1 Like

They cover the last line because they’re hiding when the window’s contents are drawn. And of course, the wider they are, the more they will cover.

You can switch off the hiding by following the directions in the article that I mentioned in another reply.

Wasn’t that (scrollbar left click behavior does Paging to Warp) a change between GTK2 and GTK3?

If you want paging back, does this ~/.config/gtk-3.0/settings.ini change do that for you?

[Settings]
gtk-primary-button-warps-slider = false

Yes, I made that change years ago, when some new Linux version made it warp. And since today, its contents are:

[Settings]
gtk-primary-button-warps-slider = false
gtk-overlay-scrolling=false

So for me, all scroll bars behave like I want them to.

And yes, they are somewhat wide, but my screen is big enough for that.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.