20

The scrollbars in Unity are of very low contrast, and I can't see where the bar is using just peripheral vision. I have to look at the scrollbar.

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

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

  • 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
  • 2
    Related bug report: Bug #563474 – Christopher Kyle Horton Mar 19 '12 at 22:40
  • Suggesting the non-appropriate question for SE sites: Why did the developers think such a low contrast scrollbar was good UI? – neuronet Sep 12 '16 at 13:27
19

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 :)

  • Tried this in Unity Ubuntu 14.04 it had no effect on my scrollbars that I've noticed so far (including after restart). – neuronet Sep 12 '16 at 13:35
  • @neuronet: Yes, I've noticed this stopped working in recent versions of Firefox (from 45 or 47) – MestreLion Oct 5 '16 at 7:18
  • Why the bleep can't Unity developers just make this a conspicuous part of system settings? The amount of time I've been annoyed about this I could have developed a new OS. :) – neuronet Oct 5 '16 at 14:54
11

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 might look like:

  • 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
9

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.

  • Works for terminal on 14.04, thanks. – markdsievers Sep 2 '14 at 0:41
  • 3
    This works great for gtk3 apps like firefox 46 and above. Instead of modifying the original theme files, the changes can be added to ~/.config/gtk-3.0/gtk.css giving each user their own preferred look while preserving the originals. – yoyoma2 Jul 25 '16 at 19:16
8

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.

  • 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
1

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
  • 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
0

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?

0

I know little about computers. My Flatron E2211 monitor has buttons on the bottom right. I went in there and adjusted the contrast and it greatly improved the visibility of the scroll button. Odd thing is, I adjusted the contrast downwards to get improvement. Go figure.

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.