diff options
author | Christian Persch <chpe@src.gnome.org> | 2020-02-19 21:41:22 +0100 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2020-02-19 21:41:22 +0100 |
commit | bc2ff07dc24ca1f20e7023c21c9f104881785498 (patch) | |
tree | 9ed42b6764c03c2406eef554c81a758c34daddc6 /src | |
parent | 215b0605773d0351b1ae05d32c29dfda09b869eb (diff) | |
download | vte-bc2ff07dc24ca1f20e7023c21c9f104881785498.tar.gz |
app: Add option to disable scrollbar
Diffstat (limited to 'src')
-rw-r--r-- | src/app/app.cc | 7 |
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[] = { |