From d990f12f5673ae0b1d9565c1252548c8c5773384 Mon Sep 17 00:00:00 2001 From: Kyle Kneitinger Date: Wed, 24 Oct 2018 05:11:18 -0700 Subject: [PATCH] Convert preview panel close button from checkbox to momentary (#2384) The {group,entry}CloseButton QToolButton, had the "checkable" property set. This caused it to act like a toggle flip flop instead of a momentary push button. After removing that property, the signal it was changed to use was clicked() instead of toggled(bool). Trigger upon click is consistent with the rest of the UI's momentary buttons. --- src/gui/EntryPreviewWidget.cpp | 4 ++-- src/gui/EntryPreviewWidget.ui | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gui/EntryPreviewWidget.cpp b/src/gui/EntryPreviewWidget.cpp index c80e4ddcf..55107a86f 100644 --- a/src/gui/EntryPreviewWidget.cpp +++ b/src/gui/EntryPreviewWidget.cpp @@ -52,13 +52,13 @@ EntryPreviewWidget::EntryPreviewWidget(QWidget* parent) m_ui->entryAttachmentsWidget->setButtonsVisible(false); connect(m_ui->entryTotpButton, SIGNAL(toggled(bool)), m_ui->entryTotpWidget, SLOT(setVisible(bool))); - connect(m_ui->entryCloseButton, SIGNAL(toggled(bool)), SLOT(hide())); + connect(m_ui->entryCloseButton, SIGNAL(clicked()), SLOT(hide())); connect(m_ui->entryTabWidget, SIGNAL(tabBarClicked(int)), SLOT(updateTabIndexes()), Qt::QueuedConnection); connect(&m_totpTimer, SIGNAL(timeout()), this, SLOT(updateTotpLabel())); // Group m_ui->groupCloseButton->setIcon(filePath()->icon("actions", "dialog-close")); - connect(m_ui->groupCloseButton, SIGNAL(toggled(bool)), SLOT(hide())); + connect(m_ui->groupCloseButton, SIGNAL(clicked()), SLOT(hide())); connect(m_ui->groupTabWidget, SIGNAL(tabBarClicked(int)), SLOT(updateTabIndexes()), Qt::QueuedConnection); } diff --git a/src/gui/EntryPreviewWidget.ui b/src/gui/EntryPreviewWidget.ui index 65b779d43..1fde8aa3c 100644 --- a/src/gui/EntryPreviewWidget.ui +++ b/src/gui/EntryPreviewWidget.ui @@ -140,9 +140,6 @@ - - true - @@ -536,9 +533,6 @@ - - true -