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)),
|
connect(m_generalUi->autoSaveAfterEveryChangeCheckBox, SIGNAL(toggled(bool)),
|
||||||
this, SLOT(enableAutoSaveOnExit(bool)));
|
this, SLOT(enableAutoSaveOnExit(bool)));
|
||||||
connect(m_generalUi->systrayShowCheckBox, SIGNAL(toggled(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)),
|
connect(m_generalUi->systrayMinimizeToTrayCheckBox, SIGNAL(toggled(bool)),
|
||||||
m_generalUi->systrayMinimizeOnCloseCheckBox, SLOT(setEnabled(bool)));
|
m_generalUi->systrayMinimizeOnCloseCheckBox, SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
@ -201,3 +201,10 @@ void SettingsWidget::enableAutoSaveOnExit(bool checked)
|
|||||||
{
|
{
|
||||||
m_generalUi->autoSaveOnExitCheckBox->setEnabled(!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 saveSettings();
|
||||||
void reject();
|
void reject();
|
||||||
void enableAutoSaveOnExit(bool checked);
|
void enableAutoSaveOnExit(bool checked);
|
||||||
|
void enableSystrayMinimizeToTray(bool checked);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWidget* const m_secWidget;
|
QWidget* const m_secWidget;
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>456</width>
|
<width>684</width>
|
||||||
<height>346</height>
|
<height>394</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
@ -104,24 +104,73 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="0">
|
<item row="11" column="0">
|
||||||
<widget class="QCheckBox" name="systrayMinimizeToTrayCheckBox">
|
<layout class="QHBoxLayout" name="systrayLayout">
|
||||||
<property name="enabled">
|
<property name="sizeConstraint">
|
||||||
<bool>false</bool>
|
<enum>QLayout::SetMaximumSize</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<item>
|
||||||
<string>Hide window to system tray when minimized</string>
|
<spacer name="horizontalSpacer">
|
||||||
</property>
|
<property name="orientation">
|
||||||
</widget>
|
<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>
|
||||||
<item row="12" column="0">
|
<item row="12" column="0">
|
||||||
<widget class="QCheckBox" name="systrayMinimizeOnCloseCheckBox">
|
<layout class="QHBoxLayout" name="systray2Layout">
|
||||||
<property name="enabled">
|
<property name="sizeConstraint">
|
||||||
<bool>false</bool>
|
<enum>QLayout::SetMaximumSize</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<item>
|
||||||
<string>Hide window to system tray instead of App Exit</string>
|
<spacer name="horizontalSpacer_2">
|
||||||
</property>
|
<property name="orientation">
|
||||||
</widget>
|
<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>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Hide window to system tray instead of App Exit</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
Reference in New Issue
Block a user