From 4bf6d8d94dd8cf16e5714a922103b73abe1e1ff5 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sun, 28 Jun 2020 10:01:24 -0400 Subject: Introduce View Menu * Move user interface settings from the settings widget into the view menu. * Add auto-restart prompt to make theme changes easy --- src/gui/EntryPreviewWidget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/EntryPreviewWidget.cpp') diff --git a/src/gui/EntryPreviewWidget.cpp b/src/gui/EntryPreviewWidget.cpp index eee1dd00d..b873800a8 100644 --- a/src/gui/EntryPreviewWidget.cpp +++ b/src/gui/EntryPreviewWidget.cpp @@ -77,6 +77,12 @@ EntryPreviewWidget::EntryPreviewWidget(QWidget* parent) connect(m_ui->entryTabWidget, SIGNAL(tabBarClicked(int)), SLOT(updateTabIndexes()), Qt::QueuedConnection); connect(&m_totpTimer, SIGNAL(timeout()), SLOT(updateTotpLabel())); + connect(config(), &Config::changed, this, [this](Config::ConfigKey key) { + if (key == Config::GUI_HidePreviewPanel) { + setVisible(!config()->get(Config::GUI_HidePreviewPanel).toBool()); + } + }); + // Group m_ui->groupCloseButton->setIcon(resources()->icon("dialog-close")); connect(m_ui->groupCloseButton, SIGNAL(clicked()), SLOT(hide())); -- cgit v1.2.3