1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

reorganize generalsettings:

* tab order on widgets
* better spacing
* consistent text
* indentation for similar settings
This commit is contained in:
agilob 2015-10-11 18:46:35 +01:00
parent 59b9e01b02
commit 15077ec142
No known key found for this signature in database
GPG Key ID: 296F0B764741106C
2 changed files with 268 additions and 225 deletions

View File

@ -151,12 +151,12 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
//general
connect(bodyUI->checkUpdates, &QCheckBox::stateChanged, this, &GeneralForm::onCheckUpdateChanged);
connect(bodyUI->transComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onTranslationUpdated()));
connect(bodyUI->cbAutorun, &QCheckBox::stateChanged, this, &GeneralForm::onAutorunUpdated);
connect(bodyUI->cbAutorun, &QCheckBox::stateChanged, this, &GeneralForm::onAutorunUpdated);\
connect(bodyUI->lightTrayIcon, &QCheckBox::stateChanged, this, &GeneralForm::onSetLightTrayIcon);
connect(bodyUI->showSystemTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetShowSystemTray);
connect(bodyUI->startInTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetAutostartInTray);
connect(bodyUI->closeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetCloseToTray);
connect(bodyUI->minimizeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetMinimizeToTray);
connect(bodyUI->lightTrayIcon, &QCheckBox::stateChanged, this, &GeneralForm::onSetLightTrayIcon);
connect(bodyUI->statusChanges, &QCheckBox::stateChanged, this, &GeneralForm::onSetStatusChange);
connect(bodyUI->autoAwaySpinBox, SIGNAL(editingFinished()), this, SLOT(onAutoAwayChanged()));
connect(bodyUI->showWindow, &QCheckBox::stateChanged, this, &GeneralForm::onShowWindowChanged);
@ -236,7 +236,6 @@ void GeneralForm::onSetShowSystemTray()
{
Settings::getInstance().setShowSystemTray(bodyUI->showSystemTray->isChecked());
emit parent->setShowSystemTray(bodyUI->showSystemTray->isChecked());
bodyUI->lightTrayIcon->setEnabled(bodyUI->showSystemTray->isChecked());
Settings::getInstance().saveGlobal();
}

View File

@ -39,8 +39,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>639</width>
<height>1388</height>
<width>631</width>
<height>1419</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,1">
@ -99,38 +99,15 @@
<item>
<widget class="QGroupBox" name="trayGroup">
<property name="title">
<string>System tray</string>
<string>System Tray</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QVBoxLayout" name="trayOptionsLayout">
<item>
<widget class="QCheckBox" name="startInTray">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string comment="toolTip for Start in tray setting">qTox will start minimized in tray.</string>
</property>
<property name="text">
<string>Start in tray</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="showSystemTray">
<property name="text">
<string>Show system tray icon</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="4" column="1">
<widget class="QCheckBox" name="closeToTray">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -147,17 +124,23 @@ instead of closing itself.</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="lightTrayIcon">
<item row="2" column="1">
<widget class="QCheckBox" name="startInTray">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string comment="toolTip for light icon setting">Enable light tray icon.</string>
<string comment="toolTip for Start in tray setting">qTox will start minimized in tray.</string>
</property>
<property name="text">
<string>Light icon</string>
<string>Start in tray</string>
</property>
</widget>
</item>
<item>
<item row="3" column="1">
<widget class="QCheckBox" name="minimizeToTray">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -174,21 +157,53 @@ instead of system taskbar.</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="showSystemTray">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Show system tray icon</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="lightTrayIcon">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string comment="toolTip for light icon setting">Enable light tray icon.</string>
</property>
<property name="text">
<string>Light icon</string>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@ -283,7 +298,7 @@ instead of system taskbar.</string>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Default directory to save files</string>
<string>Default directory to save files:</string>
</property>
</widget>
</item>
@ -309,50 +324,55 @@ instead of system taskbar.</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QVBoxLayout" name="newMessagesLayout">
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="newMessages">
<property name="title">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>On new message:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QCheckBox" name="notifySound">
<property name="toolTip">
<string comment="toolTip for Notify sound setting">Play a sound when you recieve message.</string>
</property>
<property name="text">
<string>Play sound</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="showInFront">
<property name="toolTip">
<string comment="toolTip for Focus window setting">Focus qTox when you receive message.</string>
</property>
<property name="text">
<string>Focus window</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="showWindow">
<property name="toolTip">
<string comment="tooltip for Show window setting">Open qTox's window when you receive a new message and no window is open yet.</string>
</property>
<property name="text">
<string>Open window</string>
</property>
</widget>
</item>
</layout>
<zorder>showWindow</zorder>
<zorder>showInFront</zorder>
<zorder>notifySound</zorder>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="showWindow">
<property name="toolTip">
<string comment="tooltip for Show window setting">Open qTox's window when you receive a new message and no window is open yet.</string>
</property>
<property name="text">
<string>Open window</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="notifySound">
<property name="toolTip">
<string comment="toolTip for Notify sound setting">Play a sound when you recieve message.</string>
</property>
<property name="text">
<string>Play sound</string>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_6">
<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 row="3" column="1">
<widget class="QCheckBox" name="showInFront">
<property name="toolTip">
<string comment="toolTip for Focus window setting">Focus qTox when you receive message.</string>
</property>
<property name="text">
<string>Focus window</string>
</property>
</widget>
</item>
</layout>
@ -374,23 +394,6 @@ instead of system taskbar.</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbSeparateWindow">
<property name="text">
<string>Multiple windows mode</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbDontGroupWindows">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Open each chat in an individual window</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbGroupchatPosition">
<property name="toolTip">
@ -422,6 +425,40 @@ will be sent to them when they appear online to you.</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="1">
<widget class="QCheckBox" name="cbDontGroupWindows">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Open each chat in an individual window</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="cbSeparateWindow">
<property name="text">
<string>Multiple windows mode</string>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
@ -466,6 +503,91 @@ will be sent to them when they appear online to you.</string>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="smile1">
<property name="toolTip">
<string notr="true">:)</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="smile2">
<property name="toolTip">
<string notr="true">;)</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="smile3">
<property name="toolTip">
<string notr="true">:p</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="smile4">
<property name="toolTip">
<string notr="true">:O</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="smile5">
<property name="toolTip">
<string notr="true">:'(</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="emoticonSizeLabel">
<property name="text">
@ -559,91 +681,6 @@ will be sent to them when they appear online to you.</string>
<item row="6" column="1">
<widget class="QComboBox" name="dateFormats"/>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="smile1">
<property name="toolTip">
<string notr="true">:)</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="smile2">
<property name="toolTip">
<string notr="true">;)</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="smile3">
<property name="toolTip">
<string notr="true">:p</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="smile4">
<property name="toolTip">
<string notr="true">:O</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="smile5">
<property name="toolTip">
<string notr="true">:'(</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
@ -662,7 +699,14 @@ will be sent to them when they appear online to you.</string>
<number>9</number>
</property>
<item>
<layout class="QHBoxLayout" name="coreProtocolLayout">
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QCheckBox" name="cbEnableIPv6">
<property name="text">
<string extracomment="Text on a checkbox to enable IPv6">Enable IPv6 (recommended)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbEnableUDP">
<property name="toolTip">
@ -673,30 +717,17 @@ will be sent to them when they appear online to you.</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbEnableIPv6">
<property name="text">
<string extracomment="Text on a checkbox to enable IPv6">Enable IPv6 (recommended)</string>
</property>
</widget>
</item>
<item>
<spacer name="protocolSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="proxyLayout">
<item row="1" column="0">
<widget class="QLabel" name="proxyTypeLabel">
<property name="text">
<string>Proxy type:</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QSpinBox" name="proxyPort">
<property name="minimum">
@ -707,13 +738,6 @@ will be sent to them when they appear online to you.</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="proxyTypeLabel">
<property name="text">
<string>Proxy type:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="proxyAddrLabel">
<property name="text">
@ -727,7 +751,7 @@ will be sent to them when they appear online to you.</string>
<item row="2" column="2">
<widget class="QLabel" name="proxyPortLabel">
<property name="text">
<string extracomment="Text on proxy port label">Port</string>
<string extracomment="Text on proxy port label">Port:</string>
</property>
</widget>
</item>
@ -802,19 +826,39 @@ will be sent to them when they appear online to you.</string>
<tabstops>
<tabstop>scrollArea</tabstop>
<tabstop>transComboBox</tabstop>
<tabstop>groupAlwaysNotify</tabstop>
<tabstop>lightTrayIcon</tabstop>
<tabstop>showSystemTray</tabstop>
<tabstop>startInTray</tabstop>
<tabstop>minimizeToTray</tabstop>
<tabstop>closeToTray</tabstop>
<tabstop>autoAwaySpinBox</tabstop>
<tabstop>cbAutorun</tabstop>
<tabstop>checkUpdates</tabstop>
<tabstop>autoSaveFilesDir</tabstop>
<tabstop>autoacceptFiles</tabstop>
<tabstop>notifySound</tabstop>
<tabstop>showInFront</tabstop>
<tabstop>showWindow</tabstop>
<tabstop>statusChanges</tabstop>
<tabstop>groupAlwaysNotify</tabstop>
<tabstop>cbGroupchatPosition</tabstop>
<tabstop>cbFauxOfflineMessaging</tabstop>
<tabstop>cbCompactLayout</tabstop>
<tabstop>cbSeparateWindow</tabstop>
<tabstop>cbDontGroupWindows</tabstop>
<tabstop>useEmoticons</tabstop>
<tabstop>smileyPackBrowser</tabstop>
<tabstop>emoticonSize</tabstop>
<tabstop>styleBrowser</tabstop>
<tabstop>themeColorCBox</tabstop>
<tabstop>timestamp</tabstop>
<tabstop>cbEnableUDP</tabstop>
<tabstop>dateFormats</tabstop>
<tabstop>cbEnableIPv6</tabstop>
<tabstop>cbEnableUDP</tabstop>
<tabstop>proxyType</tabstop>
<tabstop>proxyAddr</tabstop>
<tabstop>proxyPort</tabstop>
<tabstop>reconnectButton</tabstop>
</tabstops>
<resources/>
<connections>