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.

Possible Duplicate:
How to change the color of the scroll bar?

In my /home/myname/.themes/themename/gtkrc file I found this:

style "murrine-scrollbar"
{
    bg[SELECTED]    = shade (0.6, @base_color)
    bg[ACTIVE]  = @base_color

    bg[NORMAL] = shade (0.85, @bg_color)
    bg[PRELIGHT] = shade (0.83, @selected_bg_color)

    engine "murrine" 
    {
        roundness       = 9
        gradient_shades     = {1.0,1.0,1.0,1.0}
        highlight_shade     = 1.0
        glow_shade      = 1.0
        reliefstyle     = 0
        gradient_colors     = FALSE
            lightborder_shade       = 1.0
        lightborderstyle    = 0
        trough_shades           = { 5.0, 1.20}
        border_shades       = { 2.0, 2.0}
        contrast        = 0.0
        prelight_shade      = 0.65
        contrast            = 0.0
    }
}

style "hscrollbar" {
}

style "vscrollbar" {
}

style "murrine-scrollbar-dark" = "murrine-scrollbar"
{   

    engine "murrine" {
        gradient_shades         = {0.65,0.65,0.65,0.65}
        trough_shades           = { 1.0, 1.0}
        border_shades           = { 0.3, 0.3}
    }
}

style "murrine-scrollbar-sidebar" = "murrine-scrollbar" {   

    engine "murrine" {
        trough_shades           = { 0.97, 0.97}
        border_shades           = { 1.2, 1.2}
    }
}

style "murrine-sidebar" {

    base[NORMAL]                = shade (1.06, @bg_color)
    bg[NORMAL]                  = shade (1.06, @bg_color)
    text[NORMAL]                = mix (0.3, @bg_color, @text_color)

    base[SELECTED]              = shade (1.0, "#5165E1")
    base[ACTIVE]                = shade (1.0, "#5165E1")

    font_name                       = "Regular"

    GtkTreeView::odd_row_color      = shade (1.06, @bg_color)
    GtkTreeView::even_row_color     = shade (1.06, @bg_color)

    engine "murrine" {
        textstyle                   = 1
        listviewstyle               = 0
        lightborderstyle        = 1
        gradient_shades         = {1.18,1.0,1.0,0.85}
    }

}

Which line (or value) should I change for another color?

share|improve this question

marked as duplicate by Marco Ceppi Mar 6 '12 at 15:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
That looks like the Theme scrollbars not the overlay scrollbars. –  Uri Herrera Jul 26 '11 at 17:07
    
SO, how could I change the OVERLAY SCROLLBARs color? –  quangtruong1985 Jul 27 '11 at 9:58
    
I THink you can't –  Uri Herrera Jul 27 '11 at 16:07
    
More alternatives (easier/harder depending on theme): askubuntu.com/questions/103246/… –  dgo.a Feb 29 '12 at 4:56

1 Answer 1

For GTK3, you need to add something like the following to your theme:

/* overlay scrollbar */
OsThumb:selected,
OsScrollbar:selected {
    background-color: @selected_bg_color;
}

OsThumb:active,
OsScrollbar:active {
    background-color: shade (@bg_color, 0.6);
}

OsThumb:insensitive,
OsScrollbar:insensitive {
    background-color: shade (@bg_color, 0.85);
}

You'll need to change the background-color: shade (******); section to whatever you want.

For GTK2, you need to add something like this:

style "overlay_scrollbar"
{
    bg[SELECTED] = shade (1.0, @selected_bg_color)
    bg[INSENSITIVE] = shade (0.85, @bg_color)
    bg[ACTIVE] = shade (0.6, @bg_color)
}

Again, changing the colors as needed.

share|improve this answer
    
I know this is closed but to add to jrg's answer, changing the colors as needed is possible but apparently in a very limited way. Only terms defined in the first line of gtkrc, the gtk-color-scheme, can be used. In other words, selected_bg_color and bg_color maybe replaced with base_color or fg_color or tooltip_fg_color, and so on. I couldn't use hex code. –  user25656 May 27 '12 at 18:12

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