How to change overlay scrollbar color? [duplicate]

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?


Solution 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.