opt: relayout the preference language controls

fix #602
This commit is contained in:
xiaoyifang 2023-04-29 10:19:26 +08:00
parent 7f6409c05a
commit 28d33ed39f

View file

@ -53,121 +53,47 @@
<property name="topMargin"> <property name="topMargin">
<number>9</number> <number>9</number>
</property> </property>
<item row="3" column="1"> <item row="1" column="0">
<widget class="QCheckBox" name="autoScrollToTargetArticle"> <widget class="QGroupBox" name="enableTrayIcon">
<property name="toolTip"> <property name="toolTip">
<string>Normally, clicking on a link, double-clicking on a word or looking up <string>When enabled, an icon appears in the system tray area which can be used
selection in an article loads the translation and almost immediately to open main window and perform other tasks.</string>
scrolls to the article from the same dictionary. With this option off,
however, the article from the topmost dictionary is shown.</string>
</property> </property>
<property name="text"> <property name="title">
<string>Automatically scroll to target article</string> <string>Enable system tray icon</string>
</property> </property>
<property name="checked"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> <property name="checked">
</item> <bool>false</bool>
<item row="5" column="0" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout_16">
<item>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Interface language:</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_21">
<property name="text">
<string>Dictionary Font: </string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="interfaceLanguage">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QComboBox" name="fontFamilies">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>set the fallback font family for dictionary</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>Article Display style:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="displayStyle"/>
</item>
<item>
<widget class="QLabel" name="addonStylesLabel">
<property name="text">
<string>Add-on style:</string>
</property>
</widget>
</item>
<item>
<widget class="StylesComboBox" name="addonStyles"/>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="darkMode">
<property name="toolTip">
<string>Turn the UI to dark.</string>
</property>
<property name="text">
<string>Dark Mode</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="darkReaderMode">
<property name="toolTip">
<string>Turn the article display style to dark.</string>
</property>
<property name="text">
<string>Dark Reader Mode</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Startup</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QCheckBox" name="cbAutostart"> <widget class="QCheckBox" name="startToTray">
<property name="toolTip"> <property name="toolTip">
<string>Automatically starts GoldenDict after operation system bootup.</string> <string>With this on, the application starts directly to system tray without showing
its main window.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Start with system</string> <string>Start to system tray</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="closeToTray">
<property name="toolTip">
<string>With this on, an attempt to close main window would hide it instead of closing
the application.</string>
</property>
<property name="text">
<string>Close to system tray</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -185,6 +111,22 @@ With this on however, it will hide the main window.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1">
<widget class="QCheckBox" name="autoScrollToTargetArticle">
<property name="toolTip">
<string>Normally, clicking on a link, double-clicking on a word or looking up
selection in an article loads the translation and almost immediately
scrolls to the article from the same dictionary. With this option off,
however, the article from the topmost dictionary is shown.</string>
</property>
<property name="text">
<string>Automatically scroll to target article</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1"> <item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_13"> <layout class="QHBoxLayout" name="horizontalLayout_13">
<item> <item>
@ -234,14 +176,40 @@ With this on however, it will hide the main window.</string>
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="0"> <item row="1" column="1">
<widget class="QCheckBox" name="doubleClickTranslates"> <widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Startup</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="cbAutostart">
<property name="toolTip">
<string>Automatically starts GoldenDict after operation system bootup.</string>
</property>
<property name="text">
<string>Start with system</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text"> <property name="text">
<string>Double-click translates the word clicked</string> <string>Interface language:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="15" column="0" colspan="2"> <item row="7" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>Dictionary Font: </string>
</property>
</widget>
</item>
<item row="20" column="0" colspan="2">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@ -254,51 +222,65 @@ With this on however, it will hide the main window.</string>
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="0"> <item row="10" column="0" colspan="2">
<widget class="QGroupBox" name="enableTrayIcon"> <layout class="QVBoxLayout" name="verticalLayout_16">
<item>
<widget class="QCheckBox" name="darkMode">
<property name="toolTip">
<string>Turn the UI to dark.</string>
</property>
<property name="text">
<string>Dark Mode</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="darkReaderMode">
<property name="toolTip">
<string>Turn the article display style to dark.</string>
</property>
<property name="text">
<string>Dark Reader Mode</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="selectBySingleClick">
<property name="toolTip"> <property name="toolTip">
<string>When enabled, an icon appears in the system tray area which can be used <string>Turn this option on if you want to select words by single mouse click</string>
to open main window and perform other tasks.</string>
</property> </property>
<property name="title"> <property name="text">
<string>Enable system tray icon</string> <string>Select word by single click</string>
</property> </property>
<property name="alignment"> </widget>
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> </item>
<item row="6" column="0">
<widget class="QComboBox" name="interfaceLanguage">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property> </property>
<property name="flat"> </widget>
<bool>false</bool> </item>
<item row="8" column="0">
<widget class="QComboBox" name="fontFamilies">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="checkable"> <property name="toolTip">
<bool>true</bool> <string>set the fallback font family for dictionary</string>
</property> </property>
<property name="checked"> </widget>
<bool>false</bool> </item>
<item row="2" column="0">
<widget class="QCheckBox" name="doubleClickTranslates">
<property name="text">
<string>Double-click translates the word clicked</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="startToTray">
<property name="toolTip">
<string>With this on, the application starts directly to system tray without showing
its main window.</string>
</property>
<property name="text">
<string>Start to system tray</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="closeToTray">
<property name="toolTip">
<string>With this on, an attempt to close main window would hide it instead of closing
the application.</string>
</property>
<property name="text">
<string>Close to system tray</string>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="2">
@ -354,15 +336,29 @@ be the last ones.</string>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="9" column="0">
<widget class="QCheckBox" name="selectBySingleClick"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="toolTip"> <item>
<string>Turn this option on if you want to select words by single mouse click</string> <widget class="QLabel" name="label_9">
</property> <property name="text">
<property name="text"> <string>Article Display style:</string>
<string>Select word by single click</string> </property>
</property> </widget>
</widget> </item>
<item>
<widget class="QComboBox" name="displayStyle"/>
</item>
<item>
<widget class="QLabel" name="addonStylesLabel">
<property name="text">
<string>Add-on style:</string>
</property>
</widget>
</item>
<item>
<widget class="StylesComboBox" name="addonStyles"/>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>