mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
better handling and display for systray checkbox buttons
This commit is contained in:
parent
319edca870
commit
c93b12ff05
@ -73,7 +73,7 @@ SettingsWidget::SettingsWidget(QWidget* parent)
|
||||
connect(m_generalUi->autoSaveAfterEveryChangeCheckBox, SIGNAL(toggled(bool)),
|
||||
this, SLOT(enableAutoSaveOnExit(bool)));
|
||||
connect(m_generalUi->systrayShowCheckBox, SIGNAL(toggled(bool)),
|
||||
m_generalUi->systrayMinimizeToTrayCheckBox, SLOT(setEnabled(bool)));
|
||||
this, SLOT(enableSystrayMinimizeToTray(bool)));
|
||||
connect(m_generalUi->systrayMinimizeToTrayCheckBox, SIGNAL(toggled(bool)),
|
||||
m_generalUi->systrayMinimizeOnCloseCheckBox, SLOT(setEnabled(bool)));
|
||||
|
||||
@ -201,3 +201,10 @@ void SettingsWidget::enableAutoSaveOnExit(bool checked)
|
||||
{
|
||||
m_generalUi->autoSaveOnExitCheckBox->setEnabled(!checked);
|
||||
}
|
||||
|
||||
void SettingsWidget::enableSystrayMinimizeToTray(bool checked)
|
||||
{
|
||||
m_generalUi->systrayMinimizeToTrayCheckBox->setEnabled(checked);
|
||||
bool checked2 = m_generalUi->systrayMinimizeToTrayCheckBox->checkState();
|
||||
m_generalUi->systrayMinimizeOnCloseCheckBox->setEnabled(checked && checked2);
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ private Q_SLOTS:
|
||||
void saveSettings();
|
||||
void reject();
|
||||
void enableAutoSaveOnExit(bool checked);
|
||||
void enableSystrayMinimizeToTray(bool checked);
|
||||
|
||||
private:
|
||||
QWidget* const m_secWidget;
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>456</width>
|
||||
<height>346</height>
|
||||
<width>684</width>
|
||||
<height>394</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
@ -104,16 +104,63 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<layout class="QHBoxLayout" name="systrayLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="systrayMinimizeToTrayCheckBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide window to system tray when minimized</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<layout class="QHBoxLayout" name="systray2Layout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="systrayMinimizeOnCloseCheckBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -124,6 +171,8 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
Loading…
Reference in New Issue
Block a user