Open mattrose opened 4 years ago
Wow. I know vte doesn't support the auto-hiding scrollbar natively, so I was wondering how Tilix did it.
Turns out they set a transparent Gtk.ScrolledWindow() the same size as the vte window and use the automatic scrollbar from the ScrolledWindow.
if (useOverlayScrollbar) {
sw = new ScrolledWindow(vte);
sw.getStyleContext.addClass("tilix-terminal-scrolledwindow");
sw.setPropagateNaturalHeight(true);
sw.setPropagateNaturalWidth(true);
sw.getVadjustment().addOnValueChanged(&updateNewOutputIndicator);
terminalOverlay.add(sw);
} else {
terminalOverlay.add(vte);
}
From a comment on reddit
Handling of scrollbar - Tilix has perfect solution (auto-hiding, barely visible scrollbar - using modern Gnome style); Terminator has old scrollbar from GTK2 times, with an option to disable it completely (but no option for autohide the same way Tilix does it).