summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2020-02-19 21:41:22 +0100
committerChristian Persch <chpe@src.gnome.org>2020-02-19 21:41:22 +0100
commitbc2ff07dc24ca1f20e7023c21c9f104881785498 (patch)
tree9ed42b6764c03c2406eef554c81a758c34daddc6 /src
parent215b0605773d0351b1ae05d32c29dfda09b869eb (diff)
downloadvte-bc2ff07dc24ca1f20e7023c21c9f104881785498.tar.gz
app: Add option to disable scrollbar
Diffstat (limited to 'src')
-rw-r--r--src/app/app.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app/app.cc b/src/app/app.cc
index 6257c2f1..0c7eed5d 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -57,6 +57,7 @@ public:
gboolean no_geometry_hints{false};
gboolean no_hyperlink{false};
gboolean no_rewrap{false};
+ gboolean no_scrollbar{false};
gboolean no_shaping{false};
gboolean no_shell{false};
gboolean no_systemd_scope{false};
@@ -401,6 +402,8 @@ public:
"Disable hyperlinks", nullptr },
{ "no-rewrap", 'R', 0, G_OPTION_ARG_NONE, &no_rewrap,
"Disable rewrapping on resize", nullptr },
+ { "no-scrollbar", 0, 0, G_OPTION_ARG_NONE, &no_scrollbar,
+ "Disable scrollbar", nullptr },
{ "no-shaping", 0, 0, G_OPTION_ARG_NONE, &no_shaping,
"Disable Arabic shaping", nullptr },
{ "no-shell", 'S', 0, G_OPTION_ARG_NONE, &no_shell,
@@ -1797,6 +1800,10 @@ vteapp_window_constructed(GObject *object)
gtk_range_set_adjustment(GTK_RANGE(window->scrollbar),
gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(window->terminal)));
+ if (options.no_scrollbar) {
+ gtk_widget_destroy(GTK_WIDGET(window->scrollbar));
+ window->scrollbar = nullptr;
+ }
/* Create actions */
GActionEntry const entries[] = {