improve basic settings dialog layout

This commit is contained in:
parhelia512 2025-10-03 23:19:05 +08:00
parent e25d847bdb
commit ee01223f11

View File

@ -20,16 +20,6 @@
<string>Basic Settings</string> <string>Basic Settings</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="9" column="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
</property>
</widget>
</item>
<item row="0" column="3"> <item row="0" column="3">
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="minimumSize"> <property name="minimumSize">
@ -47,27 +37,36 @@
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<layout class="QHBoxLayout" name="hlayout_l1"> <widget class="QGroupBox" name="groupBox_5">
<item> <property name="title">
<widget class="QGroupBox" name="horizontalGroupBox_3"> <string>Basic Settings</string>
<layout class="QHBoxLayout" name="horizontalLayout_19"> </property>
<item> <layout class="QGridLayout" name="gridLayout_9">
<widget class="QLabel" name="label"> <item row="2" column="2">
<widget class="QCheckBox" name="allow_beta">
<property name="text"> <property name="text">
<string>Listen Address</string> <string>Allow updating to beta versions</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="3">
<widget class="QLineEdit" name="inbound_address"/> <widget class="QLabel" name="label_11">
</item> <property name="text">
</layout> <string>Custom Inbound</string>
</property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="4">
<widget class="QGroupBox" name="horizontalGroupBox_2"> <widget class="QLineEdit" name="inbound_socks_port">
<layout class="QHBoxLayout" name="horizontalLayout_13"> <property name="sizePolicy">
<item> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="inbound_socks_port_l"> <widget class="QLabel" name="inbound_socks_port_l">
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Socks <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Socks
@ -79,17 +78,33 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="4" colspan="2">
<widget class="QLineEdit" name="inbound_socks_port"> <widget class="QPushButton" name="custom_inbound_edit">
<property name="text">
<string>Edit</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="disable_tray">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="toolTip">
<string>Prevents the app from minimizing to the tray when the window is closed. The app will exit instead</string>
</property>
<property name="text">
<string>Disable tray</string>
</property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1" colspan="2">
<widget class="QLineEdit" name="inbound_address"/>
</item>
<item row="0" column="5">
<widget class="QCheckBox" name="random_listen_port"> <widget class="QCheckBox" name="random_listen_port">
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selects a random available port on every run&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selects a random available port on every run&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -99,25 +114,21 @@
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Listen Address</string>
</property>
</widget> </widget>
</item> </item>
</layout> <item row="1" column="0">
</item>
<item>
<widget class="QGroupBox" name="proxy_scheme_box">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QLabel" name="label_10"> <widget class="QLabel" name="label_10">
<property name="text"> <property name="text">
<string>Proxy Format</string> <string>Proxy Format</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="1" column="1" colspan="2">
<widget class="QComboBox" name="proxy_scheme"> <widget class="QComboBox" name="proxy_scheme">
<item> <item>
<property name="text"> <property name="text">
@ -140,103 +151,28 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="hlayout_l2"> <widget class="QGroupBox" name="groupBox_3">
<item>
<widget class="QGroupBox" name="groupbox_custom_inbound">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLabel" name="label_11">
<property name="text">
<string>Custom Inbound</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="custom_inbound_edit">
<property name="text">
<string>Edit</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox1">
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>Latency Test URL</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="test_latency_url"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="label_14">
<property name="text">
<string>Concurrent</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="test_concurrent"/>
</item>
<item>
<widget class="QLabel" name="label_22">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Timeout for URLtest in ms&lt;br/&gt;Note that muxed connections take a much longer time for their initial request, and setting this value too low will cause the test to falsely report that the config is not working&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Timeout</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="url_timeout"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="horizontalGroupBox_1_5">
<layout class="QHBoxLayout" name="horizontalLayout_1_5">
<item>
<widget class="QCheckBox" name="disable_tray">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="toolTip"> <property name="title">
<string>Prevents the app from minimizing to the tray when the window is closed. The app will exit instead</string> <string>Network Settings</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QCheckBox" name="net_use_proxy">
<property name="text"> <property name="text">
<string>Disable tray</string> <string>Use proxy</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="allow_beta"> <widget class="QCheckBox" name="net_insecure">
<property name="text"> <property name="text">
<string>Allow updating to beta versions</string> <string>Ignore TLS errors</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -244,24 +180,22 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QGroupBox" name="groupBox1">
<property name="frameShape"> <property name="title">
<enum>QFrame::Shape::StyledPanel</enum> <string>Test Settings</string>
</property> </property>
<property name="frameShadow"> <layout class="QGridLayout" name="gridLayout_3" columnstretch="0,2,0,1">
<enum>QFrame::Shadow::Raised</enum> <item row="1" column="1">
</property> <widget class="QLineEdit" name="test_concurrent"/>
<layout class="QVBoxLayout" name="verticalLayout_5"> </item>
<item> <item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_7"> <widget class="QLabel" name="label_16">
<item>
<widget class="QLabel" name="label_12">
<property name="text"> <property name="text">
<string>Speedtest mode</string> <string>Simple Download URL</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="1">
<widget class="QComboBox" name="speedtest_mode"> <widget class="QComboBox" name="speedtest_mode">
<item> <item>
<property name="text"> <property name="text">
@ -285,7 +219,28 @@
</item> </item>
</widget> </widget>
</item> </item>
<item> <item row="0" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Latency Test URL</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Speedtest mode</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Concurrent</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_19"> <widget class="QLabel" name="label_19">
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;timeout in milliseconds&lt;br/&gt;applies to all tests individually&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;timeout in milliseconds&lt;br/&gt;applies to all tests individually&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -295,24 +250,27 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="3">
<widget class="QLineEdit" name="test_timeout"/> <widget class="QLineEdit" name="url_timeout"/>
</item> </item>
</layout> <item row="1" column="2">
</item> <widget class="QLabel" name="label_22">
<item> <property name="toolTip">
<layout class="QHBoxLayout" name="horizontalLayout_3"> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Timeout for URLtest in ms&lt;br/&gt;Note that muxed connections take a much longer time for their initial request, and setting this value too low will cause the test to falsely report that the config is not working&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<item> </property>
<widget class="QLabel" name="label_16">
<property name="text"> <property name="text">
<string>Simple Download URL</string> <string>Timeout</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="3">
<widget class="QLineEdit" name="simple_down_url"/> <widget class="QLineEdit" name="test_timeout"/>
</item> </item>
</layout> <item row="0" column="1" colspan="3">
<widget class="QLineEdit" name="test_latency_url"/>
</item>
<item row="3" column="1" colspan="3">
<widget class="QLineEdit" name="simple_down_url"/>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -528,50 +486,9 @@
</widget> </widget>
<widget class="QWidget" name="tab_3"> <widget class="QWidget" name="tab_3">
<attribute name="title"> <attribute name="title">
<string>Network</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Network</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QCheckBox" name="net_use_proxy">
<property name="text">
<string>Use proxy</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="net_insecure">
<property name="text">
<string>Ignore TLS errors</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Subscription</string> <string>Subscription</string>
</property> </attribute>
<layout class="QGridLayout" name="gridLayout_10"> <layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1"> <item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>
@ -609,14 +526,14 @@
<item row="1" column="1"> <item row="1" column="1">
<widget class="MyLineEdit" name="user_agent"/> <widget class="MyLineEdit" name="user_agent"/>
</item> </item>
<item row="2" column="1"> <item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="sub_clear"> <widget class="QCheckBox" name="sub_clear">
<property name="text"> <property name="text">
<string>Clear servers before updating subscription</string> <string>Clear servers before updating subscription</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="sub_send_hwid"> <widget class="QCheckBox" name="sub_send_hwid">
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;HWID=%1&lt;/p&gt;&lt;p&gt;OS=%2&lt;/p&gt;&lt;p&gt;OS Version=%3&lt;/p&gt;&lt;p&gt;Model=%4&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;HWID=%1&lt;/p&gt;&lt;p&gt;OS=%2&lt;/p&gt;&lt;p&gt;OS Version=%3&lt;/p&gt;&lt;p&gt;Model=%4&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -648,9 +565,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_4"> <widget class="QWidget" name="tab_4">
<attribute name="title"> <attribute name="title">
<string>Core</string> <string>Core</string>
@ -912,6 +826,16 @@
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="9" column="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>