Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use auto-hiding scrollbar from GTK3, rather than the old one #216

Open
mattrose opened this issue Sep 23, 2020 · 1 comment
Open

Use auto-hiding scrollbar from GTK3, rather than the old one #216

mattrose opened this issue Sep 23, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@mattrose
Copy link
Member

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

@mattrose mattrose added the enhancement New feature or request label Sep 23, 2020
@mattrose
Copy link
Member Author

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);
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant