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>
</property>
<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">
<widget class="QTabWidget" name="tabWidget">
<property name="minimumSize">
@ -47,77 +37,98 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="hlayout_l1">
<item>
<widget class="QGroupBox" name="horizontalGroupBox_3">
<layout class="QHBoxLayout" name="horizontalLayout_19">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Listen Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="inbound_address"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="horizontalGroupBox_2">
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
<widget class="QLabel" name="inbound_socks_port_l">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Socks
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Basic Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_9">
<item row="2" column="2">
<widget class="QCheckBox" name="allow_beta">
<property name="text">
<string>Allow updating to beta versions</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Custom Inbound</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLineEdit" name="inbound_socks_port">
<property name="sizePolicy">
<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">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Socks
+ HTTP Proxy&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
</string>
</property>
<property name="text">
<string>Listen Port</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="inbound_socks_port">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="random_listen_port">
<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>
</property>
<property name="text">
<string>Random port</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="proxy_scheme_box">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_7">
</property>
<property name="text">
<string>Listen Port</string>
</property>
</widget>
</item>
<item row="1" column="4" colspan="2">
<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">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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>
</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">
<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>
</property>
<property name="text">
<string>Random port</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Listen Address</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Proxy Format</string>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="proxy_scheme">
<item>
<property name="text">
@ -140,179 +151,126 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="hlayout_l2">
<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>
<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 Settings</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="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>
<property name="title">
<string>Test Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,2,0,1">
<item row="1" column="1">
<widget class="QLineEdit" name="test_concurrent"/>
</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">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="3" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Simple Download URL</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="speedtest_mode">
<item>
<property name="text">
<string>Download + Upload</string>
</property>
</item>
<item>
<property name="text">
<string>Only Download</string>
</property>
</item>
<item>
<property name="text">
<string>Only Upload</string>
</property>
</item>
<item>
<property name="text">
<string>Simple Download</string>
</property>
</item>
</widget>
</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">
<property name="toolTip">
<string>Prevents the app from minimizing to the tray when the window is closed. The app will exit instead</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>
</property>
<property name="text">
<string>Disable tray</string>
<string>Timeout</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="allow_beta">
<item row="1" column="3">
<widget class="QLineEdit" name="url_timeout"/>
</item>
<item row="1" column="2">
<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>Allow updating to beta versions</string>
<string>Timeout</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>Speedtest mode</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="speedtest_mode">
<item>
<property name="text">
<string>Download + Upload</string>
</property>
</item>
<item>
<property name="text">
<string>Only Download</string>
</property>
</item>
<item>
<property name="text">
<string>Only Upload</string>
</property>
</item>
<item>
<property name="text">
<string>Simple Download</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_19">
<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>
</property>
<property name="text">
<string>Timeout</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="test_timeout"/>
</item>
</layout>
<item row="2" column="3">
<widget class="QLineEdit" name="test_timeout"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_16">
<property name="text">
<string>Simple Download URL</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="simple_down_url"/>
</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>
</layout>
</widget>
@ -528,125 +486,81 @@
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Network</string>
<string>Subscription</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QGroupBox" name="groupBox_3">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QCheckBox" name="sub_auto_update_enable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Enable</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_21">
<property name="text">
<string>Interval (minute, invalid if less than 30)</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="sub_auto_update">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="MyLineEdit" name="user_agent"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="sub_clear">
<property name="text">
<string>Clear servers before updating subscription</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="sub_send_hwid">
<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>
</property>
<property name="text">
<string>Enable sending HWID, device model, and OS version when updating subscription</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_20">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Network</string>
<property name="text">
<string>Automatic update</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>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>User Agent</string>
</property>
<property name="title">
<string>Subscription</string>
</property>
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QCheckBox" name="sub_auto_update_enable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Enable</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_21">
<property name="text">
<string>Interval (minute, invalid if less than 30)</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="sub_auto_update">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="MyLineEdit" name="user_agent"/>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="sub_clear">
<property name="text">
<string>Clear servers before updating subscription</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="sub_send_hwid">
<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>
</property>
<property name="text">
<string>Enable sending HWID, device model, and OS version when updating subscription</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_20">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Automatic update</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>User Agent</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
@ -912,6 +826,16 @@
</widget>
</widget>
</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>
</widget>
<customwidgets>