changed SettingsDialog layout to group options more reasonably

added checkbox for minimizing to tray
don't hide "hide on startup" on windows
This commit is contained in:
walker0643 2018-01-30 16:41:16 -05:00
parent c68d355ce5
commit cda6933f10
2 changed files with 104 additions and 111 deletions

View File

@ -54,8 +54,6 @@ SettingsDialog::SettingsDialog(QWidget* parent, AppConfig& config) :
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
m_pComboElevate->setCurrentIndex(static_cast<int>(appConfig().elevateMode())); m_pComboElevate->setCurrentIndex(static_cast<int>(appConfig().elevateMode()));
m_pCheckBoxAutoHide->hide();
#else #else
// elevate checkbox is only useful on ms windows. // elevate checkbox is only useful on ms windows.
m_pLabelElevate->hide(); m_pLabelElevate->hide();

View File

@ -15,80 +15,23 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QGroupBox" name="m_pGroupAdvanced"> <widget class="QGroupBox" name="m_pGroupGeneral">
<property name="title">
<string>&amp;Miscellaneous</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<widget class="QLabel" name="m_pLabel_19">
<property name="minimumSize">
<size>
<width>75</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Sc&amp;reen name:</string>
</property>
<property name="buddy">
<cstring>m_pLineEditScreenName</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="m_pLineEditScreenName">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="m_pLabel_20">
<property name="text">
<string>P&amp;ort:</string>
</property>
<property name="buddy">
<cstring>m_pSpinBoxPort</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="m_pSpinBoxPort">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximum"> <property name="title">
<number>65535</number> <string>General</string>
</property> </property>
<property name="value"> <layout class="QFormLayout" name="formLayout">
<number>24800</number> <property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property> </property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="m_pLabel_21">
<property name="text">
<string>&amp;Interface:</string>
</property>
<property name="buddy">
<cstring>m_pLineEditInterface</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="m_pLineEditInterface">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="m_pLabel_27"> <widget class="QLabel" name="m_pLabel_27">
<property name="sizePolicy"> <property name="sizePolicy">
@ -114,14 +57,37 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="m_pComboLanguage"/> <widget class="QComboBox" name="m_pComboLanguage"/>
</item> </item>
<item row="5" column="0"> <item row="1" column="0">
<widget class="QCheckBox" name="m_pCheckBoxAutoHide"> <widget class="QLabel" name="m_pLabel_19">
<property name="minimumSize">
<size>
<width>75</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>&amp;Hide on startup</string> <string>Sc&amp;reen name:</string>
</property>
<property name="buddy">
<cstring>m_pLineEditScreenName</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="m_pLineEditScreenName">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="m_pLabelElevate">
<property name="text">
<string>Elevate</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="m_pComboElevate"> <widget class="QComboBox" name="m_pComboElevate">
<property name="toolTip"> <property name="toolTip">
<string>Specify when the Barrier service should run at an elevated privilege level</string> <string>Specify when the Barrier service should run at an elevated privilege level</string>
@ -146,10 +112,17 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="3" column="0">
<widget class="QLabel" name="m_pLabelElevate"> <widget class="QCheckBox" name="m_pCheckBoxMinimizeToTray">
<property name="text"> <property name="text">
<string>Elevate</string> <string>Minimize to System &amp;Tray</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="m_pCheckBoxAutoHide">
<property name="text">
<string>&amp;Hide on startup</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -157,42 +130,63 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="m_pGroupNetworkSecurity"> <widget class="QGroupBox" name="m_pGroupNetworking">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title"> <property name="title">
<string>&amp;Network Security</string> <string>Networking</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="m_pCheckBoxEnableCrypto"> <widget class="QLabel" name="m_pLabel_20">
<property name="text"> <property name="text">
<string>Use &amp;SSL encryption</string> <string>P&amp;ort:</string>
</property>
<property name="buddy">
<cstring>m_pSpinBoxPort</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<spacer name="horizontalSpacer"> <widget class="QSpinBox" name="m_pSpinBoxPort">
<property name="orientation"> <property name="enabled">
<enum>Qt::Horizontal</enum> <bool>true</bool>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<width>40</width> <horstretch>0</horstretch>
<height>20</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
</spacer> <property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>24800</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="m_pLabel_21">
<property name="text">
<string>&amp;Interface:</string>
</property>
<property name="buddy">
<cstring>m_pLineEditInterface</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="m_pLineEditInterface">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="m_pCheckBoxEnableCrypto">
<property name="text">
<string>Use Enable &amp;SSL</string>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -325,10 +319,11 @@
<tabstops> <tabstops>
<tabstop>m_pComboLanguage</tabstop> <tabstop>m_pComboLanguage</tabstop>
<tabstop>m_pLineEditScreenName</tabstop> <tabstop>m_pLineEditScreenName</tabstop>
<tabstop>m_pComboElevate</tabstop>
<tabstop>m_pCheckBoxMinimizeToTray</tabstop>
<tabstop>m_pCheckBoxAutoHide</tabstop>
<tabstop>m_pSpinBoxPort</tabstop> <tabstop>m_pSpinBoxPort</tabstop>
<tabstop>m_pLineEditInterface</tabstop> <tabstop>m_pLineEditInterface</tabstop>
<tabstop>m_pComboElevate</tabstop>
<tabstop>m_pCheckBoxAutoHide</tabstop>
<tabstop>m_pCheckBoxEnableCrypto</tabstop> <tabstop>m_pCheckBoxEnableCrypto</tabstop>
<tabstop>m_pComboLogLevel</tabstop> <tabstop>m_pComboLogLevel</tabstop>
<tabstop>m_pCheckBoxLogToFile</tabstop> <tabstop>m_pCheckBoxLogToFile</tabstop>