How to get scrollbar arrows in Linux Mint 17

window_scrollbarsLinux Mint is missing the scrollbar arrow buttons at the end of the scrollbars. There are situations in which those buttons can be very useful. This how-to will explain how to get them back.

Sadly I could not find any setting related to the missing scrollbar arrows in the System Settings / Control Center, but even without the configuration being available in the GUI utility, it does not mean it cannot be done.

The theme chosen for this how-to is the theme named Mint-X. It is located in /usr/share/themes/Mint-X/. It contains the style information as css file. The specific file to enable the scrollbar arrows is located at /usr/share/themes/Mint-X/gtk-3.0/gtk-widgets.css.

$ sudo vim /usr/share/themes/Mint-X/gtk-3.0/gtk-widgets.css

This file is quite big which is why I suggest using the search functionality to locate this section inside the file. It should be located round line 1500.

/*************
 * scrollbar *
 *************/

.scrollbar {
    -GtkRange-trough-border: 2;
    -GtkScrollbar-has-backward-stepper: 0;
    -GtkScrollbar-has-forward-stepper: 0;
    -GtkRange-slider-width: 10;
    -GtkScrollbar-min-slider-length: 30;
    -GtkRange-stepper-spacing: 0;
    -GtkRange-trough-under-steppers: 1;
}

Settings found in this section are related to the scrollbar. In accordance with the gtk3 GtkScrollbar the setting “GtkScrollbar-has-backward-stepper” and “GtkScrollbar-has-forward-stepper” allow enabling the scrollbar arrows.

/*************
 * scrollbar *
 *************/

.scrollbar {
    -GtkRange-trough-border: 2;
    -GtkScrollbar-has-backward-stepper: 1;
    -GtkScrollbar-has-forward-stepper: 1;
    -GtkRange-slider-width: 10;
    -GtkScrollbar-min-slider-length: 30;
    -GtkRange-stepper-spacing: 0;
    -GtkRange-trough-under-steppers: 1;
}

Setting these to “1” enables the scrollbar arrows. This setting will affect gtk3 programs. For gtk2 programs, the same / similar changes need to be done in the gtk-2.0/ directory. The file to change the gtk-2.0 behavior is located at /usr/share/themes/Mint-X/gtk-2.0/gtkrc.

    GtkRange::trough-border = 0
    GtkRange::slider-width = 11
    GtkRange::stepper-size = 0
    GtkRange::stepper_spacing = 0
    GtkRange::trough-under-steppers     = 0

    GtkScale::slider-length     = 16
    GtkScale::slider-width = 16
    GtkScale::trough-side-details = 1

    GtkScrollbar::has-backward-stepper = 0
    GtkScrollbar::has-forward-stepper = 0
    GtkScrollbar::min-slider-length     = 30
    GtkScrollbar::slider-width = 14
    GtkScrollbar::trough-border = 0
    GtkScrollbar::activate-slider = 1

The above shows the section found around line 60. As in the gtk-3.0 configuration, the two GtkScrollbar settings should be set to 1. Additionally, the stepper-size needs to be increased. Without this, the scrollbar arrow buttons are too small to use them.

    GtkRange::trough-border = 0
    GtkRange::slider-width = 11
    GtkRange::stepper-size = 11
    GtkRange::stepper_spacing = 0
    GtkRange::trough-under-steppers     = 0

    GtkScale::slider-length     = 16
    GtkScale::slider-width = 16
    GtkScale::trough-side-details = 1

    GtkScrollbar::has-backward-stepper = 1
         GtkScrollbar::has-forward-stepper = 1
    GtkScrollbar::min-slider-length     = 30
    GtkScrollbar::slider-width = 14
    GtkScrollbar::trough-border = 0
    GtkScrollbar::activate-slider = 1
Scrallbars with enabled arrow buttons.

Scrallbars with enabled arrow buttons.

The changes are visible as soon as the Themes -> Controls setting is changed to the Mint-X theme. If this is already the active theme, change it to a different theme and back. Changing the theme seems to work quite well, but to avoid any strange behavior I would still suggest to logout and login again.


Read more of my posts on my blog at https://blog.tinned-software.net/.

This entry was posted in Linux Administration and tagged , , , , , . Bookmark the permalink.