1

How to change the non-overlay scroll bar width in Lubuntu 13.04? It is too thin for me.

1

In what follows, I'm assuming you have the default theme: /usr/share/themes/Lubuntu-default.

You haven't specified the programs for which you want wider scrollbars. By default, it's fair to say that Lubuntu mostly has gtk2 and gtk3 apps.

For gtk2 apps, open a terminal and run sudo nano /usr/share/themes/Lubuntu-default/gtk-2.0/scrollbar.rc (or use gksudo if you prefer a GUI-based text editor). Near the top of this file, you should see:

style "scrollbar" 
{
    GtkRange::slider-width = 8
    GtkRange::stepper-size = 0
    GtkCheckButtonClass::indicator-size = 14
    GtkRadioButtonClass::indicator-size = 14

Change

GtkRange::slider-width = 8  

to

GtkRange::slider-width = 12

(or to whatever is suitable) . Save the file and exit.

Now, click on the Main menu button to get a dropdown and, in this dropdown, click on Preferences and then on Customize Look and Feel. Here, in the Widgets tab, select and apply some other theme and then immediately revert to Lubuntu-default. Don't forget to click Apply each time.

There's one small problem here. If you make the scrollbar too wide, the "thumb" takes on a hollow appearance. I could be wrong here but that maybe because Lubuntu-default relies on images to draw the scrollbar rather than CSS. The images are located in /usr/share/themes/Lubuntu-default/gtk-2.0/images/ and will need to be modified by trial and error.

For gtk3 apps such as Evince (Document Viewer), you need to edit /usr/share/themes/Lubuntu-default/gtk-3.0/gtk-widgets.css. As before but way down in the file, look for this section:

/**************
 * Scrollbars *
 **************/

.scrollbar {
    -GtkRange-slider-width:     9;
    -GtkRange-stepper-size:     0;
    -GtkRange-stepper-spacing:  0;
    -GtkRange-trough-border:    0;

Change

-GtkRange-slider-width:     9;  

to

-GtkRange-slider-width:     12;  

or whatever you wish. Switch themes back and forth to get the change to take effect.

Now, you may still see some programs that have narrow scrollbars. I'll deal with just one example, that of the Chromium browser. To fix the scrollbar width in this browser, edit ~/.config/chromium/Default/User StyleSheets/Custom.css. (Note the space in User Stylesheets!). If you haven't done anything before, this file may be empty. In any case, add the following code:

::-webkit-scrollbar {
    width: 12px; /* increases width of scrollbar*/
}
::-webkit-scrollbar-thumb {
    background-color: #444 !important; /*change color to suit you*/
}

Save the file and exit. In this case you don't have to switch themes. The changes will be seen in Chromium immediately.

Notes:

  • There are some web pages, mostly related to Google, that don't follow the scrollbar width we set :(
  • There may be some other programs that aren't covered by what is given here!
  • Other themes may have different ways of dealing with scrollbars.
  • I prefer to copy over themes from usr/share/themes to ~/.themes and to give them a slightly different name. That way, the changes are user-specific and don't need sudo and, by virtue of renaming, the system and user themes will be distinct in Customize Look and Feel .
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.