Skip to content

Commit 93fec61

Browse files
committed
fix:ui尺寸固定
1 parent f57f54c commit 93fec61

File tree

3 files changed

+92
-9
lines changed

3 files changed

+92
-9
lines changed

src/ui/ui_gameSettings.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def setupUi(self, Form):
5757
sizePolicy.setVerticalStretch(0)
5858
sizePolicy.setHeightForWidth(self.comboBox_gamemode.sizePolicy().hasHeightForWidth())
5959
self.comboBox_gamemode.setSizePolicy(sizePolicy)
60+
self.comboBox_gamemode.setMinimumSize(QtCore.QSize(0, 32))
61+
self.comboBox_gamemode.setMaximumSize(QtCore.QSize(16777215, 32))
6062
font = QtGui.QFont()
6163
font.setFamily("微软雅黑")
6264
font.setPointSize(12)
@@ -103,8 +105,8 @@ def setupUi(self, Form):
103105
sizePolicy.setVerticalStretch(0)
104106
sizePolicy.setHeightForWidth(self.spinBox_pixsize.sizePolicy().hasHeightForWidth())
105107
self.spinBox_pixsize.setSizePolicy(sizePolicy)
106-
self.spinBox_pixsize.setMinimumSize(QtCore.QSize(130, 0))
107-
self.spinBox_pixsize.setMaximumSize(QtCore.QSize(16777215, 16777215))
108+
self.spinBox_pixsize.setMinimumSize(QtCore.QSize(130, 32))
109+
self.spinBox_pixsize.setMaximumSize(QtCore.QSize(16777215, 32))
108110
font = QtGui.QFont()
109111
font.setFamily("微软雅黑")
110112
font.setPointSize(12)
@@ -224,6 +226,8 @@ def setupUi(self, Form):
224226
self.verticalLayout_4.setSpacing(5)
225227
self.verticalLayout_4.setObjectName("verticalLayout_4")
226228
self.lineEdit_label = QtWidgets.QLineEdit(self.frame_3)
229+
self.lineEdit_label.setMinimumSize(QtCore.QSize(0, 33))
230+
self.lineEdit_label.setMaximumSize(QtCore.QSize(16777215, 33))
227231
font = QtGui.QFont()
228232
font.setFamily("微软雅黑")
229233
font.setPointSize(12)
@@ -244,6 +248,8 @@ def setupUi(self, Form):
244248
self.lineEdit_label.setObjectName("lineEdit_label")
245249
self.verticalLayout_4.addWidget(self.lineEdit_label)
246250
self.lineEdit_unique_label = QtWidgets.QLineEdit(self.frame_3)
251+
self.lineEdit_unique_label.setMinimumSize(QtCore.QSize(0, 33))
252+
self.lineEdit_unique_label.setMaximumSize(QtCore.QSize(16777215, 33))
247253
font = QtGui.QFont()
248254
font.setFamily("微软雅黑")
249255
font.setPointSize(12)
@@ -264,6 +270,8 @@ def setupUi(self, Form):
264270
self.lineEdit_unique_label.setObjectName("lineEdit_unique_label")
265271
self.verticalLayout_4.addWidget(self.lineEdit_unique_label)
266272
self.lineEdit_race_label = QtWidgets.QLineEdit(self.frame_3)
273+
self.lineEdit_race_label.setMinimumSize(QtCore.QSize(0, 33))
274+
self.lineEdit_race_label.setMaximumSize(QtCore.QSize(16777215, 33))
267275
font = QtGui.QFont()
268276
font.setFamily("微软雅黑")
269277
font.setPointSize(12)
@@ -428,7 +436,8 @@ def setupUi(self, Form):
428436
sizePolicy.setVerticalStretch(0)
429437
sizePolicy.setHeightForWidth(self.spinBox_auto_replay.sizePolicy().hasHeightForWidth())
430438
self.spinBox_auto_replay.setSizePolicy(sizePolicy)
431-
self.spinBox_auto_replay.setMinimumSize(QtCore.QSize(130, 0))
439+
self.spinBox_auto_replay.setMinimumSize(QtCore.QSize(130, 32))
440+
self.spinBox_auto_replay.setMaximumSize(QtCore.QSize(16777215, 32))
432441
font = QtGui.QFont()
433442
font.setFamily("微软雅黑")
434443
font.setPointSize(12)
@@ -500,6 +509,8 @@ def setupUi(self, Form):
500509
self.label_constraint.setObjectName("label_constraint")
501510
self.horizontalLayout.addWidget(self.label_constraint)
502511
self.lineEdit_constraint = QtWidgets.QLineEdit(self.widget_5)
512+
self.lineEdit_constraint.setMinimumSize(QtCore.QSize(0, 32))
513+
self.lineEdit_constraint.setMaximumSize(QtCore.QSize(16777215, 32))
503514
font = QtGui.QFont()
504515
font.setFamily("微软雅黑")
505516
font.setPointSize(12)
@@ -542,7 +553,8 @@ def setupUi(self, Form):
542553
sizePolicy.setVerticalStretch(0)
543554
sizePolicy.setHeightForWidth(self.spinBox_attempt_times_limit.sizePolicy().hasHeightForWidth())
544555
self.spinBox_attempt_times_limit.setSizePolicy(sizePolicy)
545-
self.spinBox_attempt_times_limit.setMinimumSize(QtCore.QSize(130, 0))
556+
self.spinBox_attempt_times_limit.setMinimumSize(QtCore.QSize(130, 32))
557+
self.spinBox_attempt_times_limit.setMaximumSize(QtCore.QSize(16777215, 32))
546558
font = QtGui.QFont()
547559
font.setFamily("微软雅黑")
548560
font.setPointSize(12)

uiFiles/main_board.ui

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,6 @@
636636
<addaction name="separator"/>
637637
<addaction name="action_save"/>
638638
<addaction name="action_replay"/>
639-
<addaction name="action_open_folder"/>
640639
<addaction name="separator"/>
641640
<addaction name="actiontui_chu"/>
642641
</widget>

uiFiles/ui_gs.ui

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,18 @@
113113
<verstretch>0</verstretch>
114114
</sizepolicy>
115115
</property>
116+
<property name="minimumSize">
117+
<size>
118+
<width>0</width>
119+
<height>32</height>
120+
</size>
121+
</property>
122+
<property name="maximumSize">
123+
<size>
124+
<width>16777215</width>
125+
<height>32</height>
126+
</size>
127+
</property>
116128
<property name="font">
117129
<font>
118130
<family>微软雅黑</family>
@@ -238,13 +250,13 @@ color: #3d3d3d;
238250
<property name="minimumSize">
239251
<size>
240252
<width>130</width>
241-
<height>0</height>
253+
<height>32</height>
242254
</size>
243255
</property>
244256
<property name="maximumSize">
245257
<size>
246258
<width>16777215</width>
247-
<height>16777215</height>
259+
<height>32</height>
248260
</size>
249261
</property>
250262
<property name="font">
@@ -519,6 +531,18 @@ color: #3d3d3d;</string>
519531
</property>
520532
<item>
521533
<widget class="QLineEdit" name="lineEdit_label">
534+
<property name="minimumSize">
535+
<size>
536+
<width>0</width>
537+
<height>33</height>
538+
</size>
539+
</property>
540+
<property name="maximumSize">
541+
<size>
542+
<width>16777215</width>
543+
<height>33</height>
544+
</size>
545+
</property>
522546
<property name="font">
523547
<font>
524548
<family>微软雅黑</family>
@@ -552,6 +576,18 @@ color: #3d3d3d;</string>
552576
</item>
553577
<item>
554578
<widget class="QLineEdit" name="lineEdit_unique_label">
579+
<property name="minimumSize">
580+
<size>
581+
<width>0</width>
582+
<height>33</height>
583+
</size>
584+
</property>
585+
<property name="maximumSize">
586+
<size>
587+
<width>16777215</width>
588+
<height>33</height>
589+
</size>
590+
</property>
555591
<property name="font">
556592
<font>
557593
<family>微软雅黑</family>
@@ -585,6 +621,18 @@ color: #3d3d3d;</string>
585621
</item>
586622
<item>
587623
<widget class="QLineEdit" name="lineEdit_race_label">
624+
<property name="minimumSize">
625+
<size>
626+
<width>0</width>
627+
<height>33</height>
628+
</size>
629+
</property>
630+
<property name="maximumSize">
631+
<size>
632+
<width>16777215</width>
633+
<height>33</height>
634+
</size>
635+
</property>
588636
<property name="font">
589637
<font>
590638
<family>微软雅黑</family>
@@ -971,7 +1019,13 @@ font: 12pt &quot;微软雅黑&quot;;
9711019
<property name="minimumSize">
9721020
<size>
9731021
<width>130</width>
974-
<height>0</height>
1022+
<height>32</height>
1023+
</size>
1024+
</property>
1025+
<property name="maximumSize">
1026+
<size>
1027+
<width>16777215</width>
1028+
<height>32</height>
9751029
</size>
9761030
</property>
9771031
<property name="font">
@@ -1145,6 +1199,18 @@ color: #3d3d3d;
11451199
</item>
11461200
<item>
11471201
<widget class="QLineEdit" name="lineEdit_constraint">
1202+
<property name="minimumSize">
1203+
<size>
1204+
<width>0</width>
1205+
<height>32</height>
1206+
</size>
1207+
</property>
1208+
<property name="maximumSize">
1209+
<size>
1210+
<width>16777215</width>
1211+
<height>32</height>
1212+
</size>
1213+
</property>
11481214
<property name="font">
11491215
<font>
11501216
<family>微软雅黑</family>
@@ -1236,7 +1302,13 @@ color: #3d3d3d;</string>
12361302
<property name="minimumSize">
12371303
<size>
12381304
<width>130</width>
1239-
<height>0</height>
1305+
<height>32</height>
1306+
</size>
1307+
</property>
1308+
<property name="maximumSize">
1309+
<size>
1310+
<width>16777215</width>
1311+
<height>32</height>
12401312
</size>
12411313
</property>
12421314
<property name="font">

0 commit comments

Comments
 (0)