Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The scrollbars in Unity are of very low contrast, and I can't notice where the scroll bar bug is just with peripheral vision. I have to look at the scrollbar. With a very 22" monitor, 1920*1080, the bar is quite small, and it's hard to notice where the bug is.

Look at Mac OS X interface and notice the blue, contrast scroll bar bug. You don't need to look at it directly to have the idea where you are in the page.

Every person's peripheral vision is of low-res. I don't have a screenshot, but you can imagine what you see by doing a simple trick:

take a screenshot and blur it by 15px in GIMP. This is how you see everything with peripheral vision. The scrollbar bug becomes completely invisible.

How can I change it so that it is contrast and I see where I am every time?

share|improve this question
1  
@culebrón here's your screenshot with a radial blur and 'invisible' scroll bar. I'll let you add it to your question if you want. –  Tom Brossman Feb 12 '12 at 19:02
    
@culebrón could this question possibly be the issue you are facing? –  Bruno Pereira Feb 29 '12 at 9:32
1  
Related bug report: Bug #563474 –  WarriorIng64 Mar 19 '12 at 22:40

6 Answers 6

I built upon what culebrón described and accidentally created something I think is pretty awesome...

Open /usr/share/themes/Ambiance/gtk-2.0/gtkrc as root for modification:

gksu gedit /usr/share/themes/Ambiance/gtk-2.0/gtkrc

Then modify the matching section in that file to the following (remember to back up the defaults in case you don't like the changes):

style "scrollbar" = "button" {
    xthickness = 2
    ythickness = 2

    bg[NORMAL] = shade (0.62, @bg_color)
    bg[PRELIGHT] = shade (0.66, @bg_color)

    bg[ACTIVE] = shade (0.64, @bg_color)

    engine "murrine"
    {
        border_shades = {0.95, 0.90}
        roundness = 3
        contrast = 1.0
        trough_shades = {0.92, 0.98}
        lightborder_shade = 1.3
        glowstyle = 5
        glow_shade = 1.02
        gradient_shades = {1.2, 1.0, 1.0, 0.86}
        trough_border_shades = {0.9, 0.98}
    }
}

Save, then apply the changes by toggling themes or logging out.

The new, awesome, and usable scrollbars will look like:

Preview of New Scrollbar

Hopefully someone finds this helpful, thanks!

share|improve this answer
    
For some reason, doing this doesn't affect terminal scrollbars at all. I even fiddled around in /usr/share/themes/Ambiance/gtk-2.0/apps/gnome-terminal.rc but no joy! –  adarshr Sep 14 '12 at 15:08
    
Sorry adarshr, but I'm not familiar enough with themeing to help you with the Terminal's scrollbars. Hopefully someone else can jump in with a solution. :) –  askuhn Sep 17 '12 at 2:35

A bit late, but perhaps I've found a quite nice, easy GUI solution:

gnome-color-chooser Install gnome-color-chooser

scrollbar settings in Gnome Color Chooser

Highlights:

  • Completely GUI solution, no need to manually fiddle with ~/.gtkrc
  • Only changes the settings you check. Uncheck them revert to default.
  • Changes are applied as soon as you click Apply. No need to switch themes back and forth
  • No need of sudo (but changes are to your user only)
  • Applies to "legacy" scrollbars only (the ones that need to be fixed). The "overlay" scrollbar is not modified.

The changes are quite unobtrusive: it edits (or creates) ~/.gtkrc to include its own config file:

include ".gtkrc-2.0-gnome-color-chooser"

And that file is pretty slim too:

style "gnome-color-chooser-scrollbar"
{
  bg[NORMAL] = "#ACACAC"
  bg[PRELIGHT] = "#808080"
  bg[ACTIVE] = "#ACACAC"
}
widget_class "*Scrollbar" style "gnome-color-chooser-scrollbar"

Btw, I've picked the above colors out of experiments. They blend in nicely with Ambiance's "monochrome-ish" style, being just a bit darker (and thus more visible) than default.

Until Firefox gets overlay scrollbars, I'm quite happy with my custom colors :)

share|improve this answer
up vote 7 down vote accepted

Found the solution: sudo and open /usr/share/themes/Ambiance/gtk-2.0/gtkrc and find this code:

style "scrollbar" = "button" {

Below in the curly braces, change the bg[SOMETHING] lines to look like:

    bg[NORMAL] = @selected_bg_color
    bg[PRELIGHT] = shade (1.04, @selected_bg_color)

    bg[ACTIVE] = shade (0.96, @selected_bg_color)

Or look at the colors declared in line 1 of the file and select the one you prefer. To update the looks, in System settings/Appearance, change the theme to another one and back to Ambiance.

edit: Appears that Xterm uses Radiance theme. Scrollbars in Radiance are black on black and are just invisible. So stylish, yeah! Need to do edit that theme too.

share|improve this answer
    
Please can you file a bug report to notify the developers - we need the scrollbar color configurable and your use-case will highlight this. thanks. –  fossfreedom Feb 12 '12 at 11:04
    
@fossfreedom, I think you could edit out the "Unity" from "Unity scroll-bar" since I think the OP is referring to the conventional scrollbars (gtk-2.0) that we see in LibreOffice and Firefox, for example. Leaving "Unity" in place may give the impression that it's the "new" overlay scrollbars being talked about. –  user25656 Feb 12 '12 at 12:16
    
@vasa1 - I'll let the OP answer this one... –  fossfreedom Feb 12 '12 at 12:47
    
It might be a better idea to make this modification in a user's directory instead of systemwide –  Jorge Castro Aug 5 '12 at 22:34

The above changes the scroll bar for applications that use the gtk2 theme files. So does the gnome-color-chooser, (atleast the one in the current repository). For gtk3 applications, like gnome-terminal and gedit in 13.04 using gnome-fallback, one needs to change /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css.

To do this

sudo gedit /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css

and replace the * scrollbar * section with this:

/*************
 * scrollbar *
 *************/
.scrollbar,
.scrollbar.vertical {
    -GtkScrollbar-has-backward-stepper: 0;
    -GtkScrollbar-has-forward-stepper: 0;
    -GtkRange-slider-width: 14;

    border-radius: 3px;

    border-image: none;
}

.scrollbar.trough,
.scrollbar.trough.vertical {
    border-color: shade (@bg_color, 0.64);
}

.scrollbar.trough.horizontal {
}

.scrollbar.slider,
.scrollbar.slider:hover,
.scrollbar.button,
.scrollbar.slider.vertical,
.scrollbar.slider.vertical:hover,
.scrollbar.button.vertical {
    border-width: 1px;
    border-style: solid;
    border-color: shade (@bg_color, 0.4);
    background-image: -gtk-gradient (linear, left top, right top,
                                     from (shade (@button_bg_color, 0.76)),
                                     to (shade (@button_bg_color, 0.62)));
    box-shadow: inset 1px 0 shade (@button_bg_color, 0.85),
                inset -1px 0 shade (@button_bg_color, 0.62),
                inset 0 1px shade (@button_bg_color, 0.9),
                inset 0 -1px shade (@button_bg_color, 0.62);
}

.scrollbar.slider.horizontal,
.scrollbar.slider.horizontal:hover,
.scrollbar.button.horizontal {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@button_bg_color, 0.76)),
                                     to (shade (@button_bg_color, 0.62)));
    box-shadow: inset 1px 0 shade (@button_bg_color, 0.85),
                inset -1px 0 shade (@button_bg_color, 0.62),
                inset 0 1px shade (@button_bg_color, 0.9),
                inset 0 -1px shade (@button_bg_color, 0.62);

}

.scrollbar.button,
.scrollbar.button:insensitive {
}

This gives a scrollbar in gtk3 that looks like this:

http://i.stack.imgur.com/m385G.png

Which is kinda similiar to the one for gtk2 above. The small ticks and proper steppers is not included here though.

share|improve this answer
    
Works for terminal on 14.04, thanks. –  markdsievers Sep 2 at 0:41

Although not a direct answer to the question, if you dislike the new scrollbars (I don't blame you, they are quite horrendous in my personal opinion), you can revert to standard scrollbars by running the following command:

sudo apt-get remove overlay-scrollbar liboverlay-scrollbar3-0.2-0 liboverlay-scrollbar-0.2-0
share|improve this answer
    
It's possible that the OP is concerned with the conventional scrollbars and not the overlay-scrollbar since editing /usr/share/themes/Ambiance/gtk-2.0/gtkrc helped. –  user25656 Feb 12 '12 at 12:02
    
I'm okay with them, they look stylish, but the "stylish" thing is obviously overdone here, at the cost of usability. The same goes for the fashion of writing in all small letters or all caps, "ubuntu". The less sticks are sticking out of the line, the worse is readability. –  culebrón Feb 12 '12 at 15:17
    
Question is obviously about the conventional (or "legacy") scrollbar, since that's the one with poor contrast. You may or may not like the new overlay style, but its thin orange over gray at least has proper contrast. –  MestreLion May 25 '13 at 11:41

Another alternative:

Some themes that come with colored scrollbars, (Adwaita, NewLooks, etc), have scrollbars that can be easily changed be altering the selected_bg_color setting using dconf-editor: How do I change the "Selected Items" color?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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