In preparation for another feature, expose an API so that any users of this widget can control the scrollbar visibility.
@@ -548,6 +548,11 @@ void TerminalWidget::set_opacity(u8 new_opacity)
update();
}
+void TerminalWidget::set_show_scrollbar(bool show_scrollbar)
+{
+ m_scrollbar->set_visible(show_scrollbar);
+}
+
bool TerminalWidget::has_selection() const
{
return m_selection.is_valid();
@@ -43,6 +43,8 @@ public:
void set_opacity(u8);
float opacity() { return m_opacity; };
+ void set_show_scrollbar(bool);
enum class BellMode {
Visible,
AudibleBeep,