I am working with a GTK3 application that needs always visible, always active scrollbars with visible steppers. I have been able to achieve this with css:
scrollbar.hover,
scrollbar {
margin-left: 2px;
-GtkScrollbar-has-backward-stepper: 1;
-GtkScrollbar-has-forward-stepper: 1;
}
scrollbar trough {
min-width: 30px;
}
scrollbar button {
min-height: 30px;
min-width: 30px;
}
scrollbar.right slider {
min-height: 70px;
min-width: 30px;
}
along with this code:
GtkWidget *sw = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); //never horizontal, always vertical
g_object_set(sw, "overlay-scrolling", FALSE, NULL);
However setting overlay-scrolling to FALSE means that the scrollbars are off to the side of the GtkScrolledWindow, rather than within it. This causes layout problems for the application (a legacy application that was ported from an earlier version of gtk).
But, if I enable overlay-scrolling, the scrollbars are hidden after a couple of seconds without motion events to the GtkScolledWindow.
I've been using GtkInspector to mess with anything I can to try and disable hiding the scrollbars, but without success.
A hack would be to set a timer to keep sending motion events to the window to keep the scrollbar from hiding... but that's terribly ugly.
Any advice on where to find the secret sauce to disable overlay scrollbar hiding?