Fix on/off icons not being redrawn on theme change

This commit is contained in:
Janek Bevendorff 2021-01-31 20:08:03 +01:00
parent b55f419386
commit 4e90cb5818
4 changed files with 11 additions and 29 deletions

View file

@ -50,9 +50,9 @@ EntryPreviewWidget::EntryPreviewWidget(QWidget* parent)
// Entry
m_ui->entryTotpButton->setIcon(icons()->icon("chronometer"));
m_ui->entryCloseButton->setIcon(icons()->icon("dialog-close"));
m_ui->togglePasswordButton->setIcon(icons()->onOffIcon("password-show"));
m_ui->toggleEntryNotesButton->setIcon(icons()->onOffIcon("password-show"));
m_ui->toggleGroupNotesButton->setIcon(icons()->onOffIcon("password-show"));
m_ui->togglePasswordButton->setIcon(icons()->onOffIcon("password-show", true));
m_ui->toggleEntryNotesButton->setIcon(icons()->onOffIcon("password-show", true));
m_ui->toggleGroupNotesButton->setIcon(icons()->onOffIcon("password-show", true));
m_ui->entryAttachmentsWidget->setReadOnly(true);
m_ui->entryAttachmentsWidget->setButtonsVisible(false);
@ -199,16 +199,19 @@ void EntryPreviewWidget::setPasswordVisible(bool state)
} else {
m_ui->entryPasswordLabel->setText(QString("\u25cf").repeated(6));
}
m_ui->togglePasswordButton->setIcon(icons()->onOffIcon("password-show", state));
}
void EntryPreviewWidget::setEntryNotesVisible(bool state)
{
setNotesVisible(m_ui->entryNotesTextEdit, m_currentEntry->notes(), state);
m_ui->toggleEntryNotesButton->setIcon(icons()->onOffIcon("password-show", state));
}
void EntryPreviewWidget::setGroupNotesVisible(bool state)
{
setNotesVisible(m_ui->groupNotesTextEdit, m_currentGroup->notes(), state);
m_ui->toggleGroupNotesButton->setIcon(icons()->onOffIcon("password-show", state));
}
void EntryPreviewWidget::setNotesVisible(QTextEdit* notesWidget, const QString& notes, bool state)