可能重复:
如何改变滚动条的颜色?
在我的 /home/myname/.themes/themename/gtkrc 文件中我发现了这一点:
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}
}
}
我应该将哪条线(或值)更改为其他颜色?
答案1
对于 GTK3,你需要在主题中添加类似以下内容:
/* 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);
}
您需要将该background-color: shade (******);
部分更改为您想要的任何内容。
对于 GTK2,你需要添加如下内容:
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)
}
再次根据需要改变颜色。