catatan:
Format dalam jawaban ini hanya optimal untuk tepat (Ubuntu 12,04) saja, lihat jawaban berikutnya untuk format yang ditingkatkan untuk tepercaya (Ubuntu 14,04).
Jadikan scrollbar terlihat (ubah warna)
Berdasarkan informasi vasa1 yang disediakan di atas, saya mengubah warna scrollbar klasik ke warna pilihan default - sama dengan yang digunakan juga oleh scrollbar overlay.
Untuk memodifikasi aplikasi GTK 3:
gksu gedit /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css
mulai dari baris 1580 sehingga terlihat seperti:
.scrollbar.slider,
.scrollbar.slider:hover,
.scrollbar.button,
.scrollbar.slider.vertical,
.scrollbar.button.vertical {
background-image: -gtk-gradient (linear, left top, right top,
from (shade (@selected_bg_color, 1.38)),
to (shade (@selected_bg_color, 1.22)));
border-style: solid;
border-width: 1px;
-unico-border-gradient: -gtk-gradient (linear, left top, right top,
from (shade (@selected_bg_color, 1.14)),
to (shade (@selected_bg_color, 1.14)));
-unico-centroid-texture: url("assets/scrollbar_handle_vertical.png");
-unico-inner-stroke-gradient: -gtk-gradient (linear, left top, right top,
from (shade (@selected_bg_color, 1.46)),
to (shade (@selected_bg_color, 1.3)));
-unico-inner-stroke-width: 1px;
}
.scrollbar.slider.vertical:hover {
background-image: -gtk-gradient (linear, left top, right top,
from (shade (@selected_bg_color, 1.28)),
to (shade (@selected_bg_color, 1.02)));
border-style: solid;
border-width: 1px;
-unico-border-gradient: -gtk-gradient (linear, left top, right top,
from (shade (@selected_bg_color, 0.94)),
to (shade (@selected_bg_color, 0.94)));
-unico-centroid-texture: url("assets/scrollbar_handle_vertical.png");
-unico-inner-stroke-gradient: -gtk-gradient (linear, left top, right top,
from (shade (@selected_bg_color, 1.36)),
to (shade (@selected_bg_color, 1.1)));
-unico-inner-stroke-width: 1px;
}
.scrollbar.slider.horizontal,
.scrollbar.button.horizontal {
background-image: -gtk-gradient (linear, left top, left bottom,
from (shade (@selected_bg_color, 1.38)),
to (shade (@selected_bg_color, 1.22)));
-unico-border-gradient: -gtk-gradient (linear, left top, left bottom,
from (shade (@selected_bg_color, 1.14)),
to (shade (@selected_bg_color, 1.14)));
-unico-centroid-texture: url("assets/scrollbar_handle.png");
-unico-inner-stroke-gradient: -gtk-gradient (linear, left top, left bottom,
from (shade (@selected_bg_color, 1.46)),
to (shade (@selected_bg_color, 1.3)));
}
.scrollbar.slider.horizontal:hover {
background-image: -gtk-gradient (linear, left top, left bottom,
from (shade (@selected_bg_color, 1.28)),
to (shade (@selected_bg_color, 1.02)));
-unico-border-gradient: -gtk-gradient (linear, left top, left bottom,
from (shade (@selected_bg_color, 0.94)),
to (shade (@selected_bg_color, 0.94)));
-unico-centroid-texture: url("assets/scrollbar_handle.png");
-unico-inner-stroke-gradient: -gtk-gradient (linear, left top, left bottom,
from (shade (@selected_bg_color, 1.36)),
to (shade (@selected_bg_color, 1.1)));
}
.scrollbar.button,
.scrollbar.button:insensitive {
-unico-outer-stroke-width: 0;
}
Ini harusnya default.
Untuk memodifikasi aplikasi GTK 2:
gksu gedit /usr/share/themes/Ambiance/gtk-2.0/gtkrc
mulai dari baris 223 sehingga terlihat seperti:
style "scrollbar" = "button" {
xthickness = 2
ythickness = 2
bg[NORMAL] = shade(1.3, @selected_bg_color)
bg[PRELIGHT] = shade (1.04, @selected_bg_color)
bg[ACTIVE] = shade (0.96, @selected_bg_color)
engine "murrine"
{
border_shades = {1.15, 1.1}
roundness = 20
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}
}
}
Itu tidak terlihat 100% identik dengan format GTK 3, jadi silakan memperbaikinya.
Jadikan bilah gulir dapat diklik (menambah lebar)
Untuk menambah lebar kecil konyol yang tidak pernah dimaksudkan untuk digunakan dalam produksi, saya berasumsi, membuat perubahan berikut pada file yang sama.
Untuk aplikasi GTK 3:
gksu gedit /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css
ubah baris 1550 sehingga terlihat seperti:
.scrollbar {
-GtkScrollbar-has-backward-stepper: 0;
-GtkScrollbar-has-forward-stepper: 0;
-GtkRange-slider-width: 16;
border-radius: 20px;
-unico-border-gradient: -gtk-gradient (linear, left top, left bottom,
from (shade (@bg_color, 0.74)),
to (shade (@bg_color, 0.74)));
}
Untuk memodifikasi aplikasi GTK 2:
gksu gedit /usr/share/themes/Ambiance/gtk-2.0/gtkrc
ubah baris 34 sehingga terlihat seperti:
GtkScrollbar::slider-width = 16
Bagi mereka yang lebih memilih file lengkap yang sudah diedit, Anda dapat mengunduh file saya dari sini:
GTK 3: gtk-widgets.css
GTK 2: gtkrc
Hati-hati. Buat cadangan.
Nikmati! :)