mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-27 01:56:32 -05:00
Hint is displayed when notes section is hidden.
The alignment is a bit off, however. A better option may be simply disabling the QPlainTextEdit widget and stashing the actual notes in another buffer somewhere.
This commit is contained in:
parent
fdceeb368e
commit
ff01a7da1e
3 changed files with 22 additions and 2 deletions
|
|
@ -99,7 +99,7 @@ void EditEntryWidget::setupMain()
|
||||||
connect(m_mainUi->togglePasswordButton, SIGNAL(toggled(bool)), m_mainUi->passwordEdit, SLOT(setShowPassword(bool)));
|
connect(m_mainUi->togglePasswordButton, SIGNAL(toggled(bool)), m_mainUi->passwordEdit, SLOT(setShowPassword(bool)));
|
||||||
connect(m_mainUi->togglePasswordGeneratorButton, SIGNAL(toggled(bool)), SLOT(togglePasswordGeneratorButton(bool)));
|
connect(m_mainUi->togglePasswordGeneratorButton, SIGNAL(toggled(bool)), SLOT(togglePasswordGeneratorButton(bool)));
|
||||||
connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), m_mainUi->expireDatePicker, SLOT(setEnabled(bool)));
|
connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), m_mainUi->expireDatePicker, SLOT(setEnabled(bool)));
|
||||||
connect(m_mainUi->notesEnabled, SIGNAL(toggled(bool)), m_mainUi->notesEdit, SLOT(setVisible(bool)));
|
connect(m_mainUi->notesEnabled, SIGNAL(toggled(bool)), this, SLOT(toggleHideNotes(bool)));
|
||||||
m_mainUi->passwordRepeatEdit->enableVerifyMode(m_mainUi->passwordEdit);
|
m_mainUi->passwordRepeatEdit->enableVerifyMode(m_mainUi->passwordEdit);
|
||||||
connect(m_mainUi->passwordGenerator, SIGNAL(appliedPassword(QString)), SLOT(setGeneratedPassword(QString)));
|
connect(m_mainUi->passwordGenerator, SIGNAL(appliedPassword(QString)), SLOT(setGeneratedPassword(QString)));
|
||||||
|
|
||||||
|
|
@ -262,6 +262,12 @@ void EditEntryWidget::updateAttachmentButtonsEnabled(const QModelIndex& current)
|
||||||
m_advancedUi->removeAttachmentButton->setEnabled(enable && !m_history);
|
m_advancedUi->removeAttachmentButton->setEnabled(enable && !m_history);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EditEntryWidget::toggleHideNotes(bool visible)
|
||||||
|
{
|
||||||
|
m_mainUi->notesEdit->setVisible(visible);
|
||||||
|
m_mainUi->notesHint->setVisible(!visible);
|
||||||
|
}
|
||||||
|
|
||||||
QString EditEntryWidget::entryTitle() const
|
QString EditEntryWidget::entryTitle() const
|
||||||
{
|
{
|
||||||
if (m_entry) {
|
if (m_entry) {
|
||||||
|
|
@ -311,7 +317,7 @@ void EditEntryWidget::setForms(const Entry* entry, bool restore)
|
||||||
m_mainUi->expireDatePicker->setReadOnly(m_history);
|
m_mainUi->expireDatePicker->setReadOnly(m_history);
|
||||||
m_mainUi->notesEnabled->setChecked(true);
|
m_mainUi->notesEnabled->setChecked(true);
|
||||||
m_mainUi->notesEdit->setReadOnly(m_history);
|
m_mainUi->notesEdit->setReadOnly(m_history);
|
||||||
m_mainUi->notesEdit->setVisible(false);
|
m_mainUi->notesEdit->setVisible(true);
|
||||||
m_mainUi->togglePasswordGeneratorButton->setChecked(false);
|
m_mainUi->togglePasswordGeneratorButton->setChecked(false);
|
||||||
m_mainUi->togglePasswordGeneratorButton->setDisabled(m_history);
|
m_mainUi->togglePasswordGeneratorButton->setDisabled(m_history);
|
||||||
m_mainUi->passwordGenerator->reset();
|
m_mainUi->passwordGenerator->reset();
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ private slots:
|
||||||
void updateHistoryButtons(const QModelIndex& current, const QModelIndex& previous);
|
void updateHistoryButtons(const QModelIndex& current, const QModelIndex& previous);
|
||||||
void useExpiryPreset(QAction* action);
|
void useExpiryPreset(QAction* action);
|
||||||
void updateAttachmentButtonsEnabled(const QModelIndex& current);
|
void updateAttachmentButtonsEnabled(const QModelIndex& current);
|
||||||
|
void toggleHideNotes(bool visible);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupMain();
|
void setupMain();
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,19 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="9" column="1">
|
||||||
|
<widget class="QLabel" name="notesHint">
|
||||||
|
<property name="visible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Toggle the checkbox to reveal the notes section.</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="0" alignment="Qt::AlignRight">
|
<item row="1" column="0" alignment="Qt::AlignRight">
|
||||||
<widget class="QLabel" name="usernameLabel">
|
<widget class="QLabel" name="usernameLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue