How do I get a bigger static scrollbar (aka normal scrollbar)?

I think you should be cautious there. Many of us will NOT recommend you edit the system-wide defaults for a theme, unless you really do intend to interfere with the activity of all user accounts in the system. If you happen to make an error while doing that, then it affects all user accounts. Another point of caution is that when packages are updated, your changes will be erased.

Another shortcoming of this strategy is that it only changes the behavior of one GTK theme, but you might want to change the scrollbar size in ALL GTK-3.0 themes.

Instead, edit configuration files inside a user account. The trick is to figure out which one is the shortest distance to the desired endpoint. The GTK file you edit is part of a CSS (Cascading Style Sheets) setup, so the customization you put in your account will modify the settings.

In your user account, in the folder ~/.config/gtk-3.0/gtk.css I currently have this in a file called "gtk.css"

.scrollbar {
  -GtkScrollbar-has-backward-stepper: true;
  -GtkScrollbar-has-forward-stepper: true;
  -GtkRange-slider-width: 20;
  -GtkRange-stepper-size: 20;
}

If you play around with this a little bit, you'll find it is possible to integrate many specific changes from the theme file you were editing above. At one time I tried very hard to fiddle lots of settings, but I'm in the "keep it simple" mode now.

If you really do want to edit a lot of settings, the right thing to do is to COPY the whole gtk-widgets.css file and put it in your ~/.config/gtk-3.0 folder. Then go to town fiddling with settings.

In the same folder, I have a file named "settings.ini"

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

This prevents a click in the scrollbar from moving to a certain point in the file, instead it advances just one screen. I prefer that!

The other thing worth knowing is that changing that theme file (either as previously recommended by @Dorian or by a user account change for all GTK-3.0 based themes as I suggest) only changes programs that are based on the GTK-3.0 toolkit. It does not change the scrollbar for all applications. It is only for the ones that read that gtk-3.0 config file. Since you are editing a gtk-3.0 theme, apps written with QT or gtk-2.0 will not change. Hence, changing the scrollbar size of all programs is rather more difficult/tedious than you might expect.

I have changed the scrollbar width in gtk-2.0 as well. This is done in a separate folder ~/.config/gtk-2.0. The file to create is named gtkrc

style "scroll"
{
 GtkScrollbar::slider-width = 20
}

Note that gtk-2.0 is a differently designed setup so the syntax is different, you can't just copy the gtk-3.0 css into the gtk-2.0 folder.

I have noticed that some applications behave badly when you make the scrollbar different because the size of the "grabber" inside the slider trough is not resized correctly. I suspect the scrollbar-dragging changes in @Dorian's file would help with that. I may come back and try that. I'll let you know.

Summary: The key "old time Linux system administrator advice is" DON'T edit config files on a system-wide basis. You are putting your system at risk, your changes won't last across revisions, and it requires root access, which is never good for cosmetic things like this. Find a way to make changes in your user account.

PS. If you really you want to fiddle around with system files (sometimes I do if I really want to insist all users have my favorite football team colors as their wallpaper and color scheme :) ), the first thing you should do is make a copy of the original file and name the original "gtk-widgets.css.orig". Then when you edit your file, save a copy of your edit as "gtk-widgets.css.20160919", where I have the YYYYMMDD date on the end of it. This way, when the deb package is updated, you'll have a copy of your edited file. The one you edit named gtk-widgets.css will be obliterated by package installation.


Edit this file /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css

Look for this line (around line 1200): -GtkRange-slider-width: 10;

And change 10 to a bigger number like 20 or 30, and done :)

I also think they're too small...

See this image:

enter image description here

If you change the scrollbar size to 16 and you want them to stay that way, and not shrink when you don't have the mouse on it, then make the changes in the picture above.

If you use a size other than 16, just experiment with the margin sizes to get it right.


Changing -GtkRange-slider-width has no effect on the default GTK+3 theme. Instead, you can do this:

scrollbar slider {
    /* Size of the slider */
    min-width: 20px;
    min-height: 20px;
    border-radius: 22px;

    /* Padding around the slider */
    border: 5px solid transparent;
}

(Place the above in ~/.config/gtk-3.0/gtk.css.)

Tags:

Scrollbar