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.
This commit is contained in:
Kyle Kneitinger 2018-10-24 05:11:18 -07:00 committed by Jonathan White
parent 1d9f46ebc5
commit d990f12f56
2 changed files with 2 additions and 8 deletions

View File

@ -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);
}

View File

@ -140,9 +140,6 @@
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -536,9 +533,6 @@
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>