UI: Options: Change "Lock Password" button's style

This commit is contained in:
Nodir Temirkhodjaev 2022-03-11 15:18:10 +03:00
parent f107029fc2
commit 0f9125a8b3
3 changed files with 11 additions and 8 deletions

View File

@ -14,6 +14,7 @@ QT_FORWARD_DECLARE_CLASS(QMenu)
QT_FORWARD_DECLARE_CLASS(QPushButton)
QT_FORWARD_DECLARE_CLASS(QSplitter)
QT_FORWARD_DECLARE_CLASS(QTabBar)
QT_FORWARD_DECLARE_CLASS(QToolButton)
class ConfManager;
class DriverManager;

View File

@ -10,6 +10,7 @@
#include <QMessageBox>
#include <QPushButton>
#include <QStandardItemModel>
#include <QToolButton>
#include <QVBoxLayout>
#include <conf/confmanager.h>
@ -87,6 +88,13 @@ void OptionsPage::onAboutToSave()
}
}
void OptionsPage::onEditResetted()
{
// Password
setPasswordEdited(false);
retranslateEditPassword();
}
void OptionsPage::saveAutoRunMode(int mode)
{
if (m_currentAutoRunMode == mode)
@ -133,12 +141,6 @@ void OptionsPage::saveService(bool isService)
fortManager(), &FortManager::processRestartRequired, Qt::QueuedConnection);
}
void OptionsPage::onEditResetted()
{
setPasswordEdited(false);
retranslateEditPassword();
}
void OptionsPage::onRetranslateUi()
{
m_gbStartup->setTitle(tr("Startup"));
@ -477,7 +479,7 @@ void OptionsPage::setupEditPassword()
void OptionsPage::setupPasswordLock()
{
m_btPasswordLock = ControlUtil::createFlatButton(":/icons/lock_open.png", [&] {
m_btPasswordLock = ControlUtil::createToolButton(":/icons/lock_open.png", [&] {
settings()->resetCheckedPassword();
m_btPasswordLock->hide();
});

View File

@ -80,7 +80,7 @@ private:
QCheckBox *m_cbHotKeys = nullptr;
QCheckBox *m_cbPassword = nullptr;
QLineEdit *m_editPassword = nullptr;
QPushButton *m_btPasswordLock = nullptr;
QToolButton *m_btPasswordLock = nullptr;
QLabel *m_labelLanguage = nullptr;
QComboBox *m_comboLanguage = nullptr;
QLabel *m_labelTrayEvent = nullptr;