Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Enable classic scrollbars (add steppers and disable overlay)

Just as the name says, here is where you can post tips and tricks to share with other users of MEPIS.
Post Reply
Message
Author
User avatar
rich
Forum Regular
Forum Regular
Posts: 287
Joined: Sat Mar 31, 2018 6:39 pm

Enable classic scrollbars (add steppers and disable overlay)

#1 Post by rich » Mon May 28, 2018 3:08 pm

edit - Woops, should have searched before posting! A similar guide has already been posted here: viewtopic.php?f=95&t=44128

edit -June 7, 2018 - Upon further inspection the QT theme seems to have steppers (invisible or not) regardless of gtk theme options

Do you prefer classic scrollbars with buttons to click at the top and bottom? The kind that doesn't hide when you're not looking? I do, especially because the trackpad on my laptop makes it hard to click and drag. Here we'll see how to add the buttons at the top and bottom of the scrollbar and how to make the scrollbars stop disappearing when you move your mouse.

1.) Add scrollbar steppers
MX, for the most part, uses three different toolkits - gtk2, gtk3, and qt5. qt5, by default, will mimic gtk2, so we only need to talk to gtk2 and gtk3 here to get our scrollbar "steppers" (buttons). For gtk2, we can add this file:

~/.gtkrc-2.0

Code: Select all

style "scrollbar-steppers"
{
    GtkRange::stepper-size      = 13
    GtkScrollbar::stepper-size  = 13
    GtkScrollbar::has-backward-stepper      = 1  
    GtkScrollbar::has-forward-stepper       = 1
}
class "GtkScrollbar" style "scrollbar-steppers"
This will make it so whatever our theme is, gtk2 and qt5 will try to show scrollbar steppers. For gtk3, we can add this file:

~/.config/gtk-3.0/gtk.css

Code: Select all

.scrollbar,
scrollbar {
    -GtkScrollbar-has-backward-stepper: 1;
    -GtkScrollbar-has-forward-stepper: 1;
}
This will make it so whatever our theme is, gtk3 will try to show scrollbar steppers. But in gtk3 applications like Catfish or Transmission, why does the scrollbar keep trying to hide when you move the mouse away? This is because of the "gtk overlay scrolling" setting.

2.) Disable scrollbar overlay
To disable this behavior we need to set an environmental variable. This can be done in a number of ways, for consistency here I've decided to do so with a little config file in Xsession.d. As root, add the following file:

/etc/X11/Xsession.d/97scrollbars

Code: Select all

export GTK_OVERLAY_SCROLLING=0
Log out and back in and you're golden!

You may notice qt applications like Featherpad won't actually show the steppers under certain themes such as the default Greybird-mx17, whereas in others like Numix they will. They work either way by clicking where the button is or should be.

Default -
default.png
Default theme with steppers and disabled scrollbar overlay -
mod1.png
Numix theme with steppers and disabled scrollbar overlay -
mod2.png
You do not have the required permissions to view the files attached to this post.
MX 17.1 Dell Inspiron N5110

Post Reply

Return to “Tips&Tricks”