Skip to content

Commit e3668fb

Browse files
improve: 更新GUI字体为微软雅黑并调整相关布局
1 parent b88dccd commit e3668fb

File tree

3 files changed

+44
-21
lines changed

3 files changed

+44
-21
lines changed

GUI_style.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Form implementation generated from reading ui file '.\GUI_style.ui'
22
#
3-
# Created by: PyQt6 UI code generator 6.5.1
3+
# Created by: PyQt6 UI code generator 6.8.0
44
#
55
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
66
# run again. Do not edit this file unless you know what you are doing.
@@ -18,13 +18,17 @@ def setupUi(self, AutoSubtitle):
1818
sizePolicy.setVerticalStretch(0)
1919
sizePolicy.setHeightForWidth(AutoSubtitle.sizePolicy().hasHeightForWidth())
2020
AutoSubtitle.setSizePolicy(sizePolicy)
21+
font = QtGui.QFont()
22+
font.setFamily("微软雅黑")
23+
AutoSubtitle.setFont(font)
2124
AutoSubtitle.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.NoContextMenu)
2225
AutoSubtitle.setUnifiedTitleAndToolBarOnMac(False)
2326
self.centralwidget = QtWidgets.QWidget(parent=AutoSubtitle)
2427
self.centralwidget.setObjectName("centralwidget")
2528
self.startButton = QtWidgets.QPushButton(parent=self.centralwidget)
2629
self.startButton.setGeometry(QtCore.QRect(120, 150, 331, 41))
2730
font = QtGui.QFont()
31+
font.setFamily("微软雅黑")
2832
font.setPointSize(12)
2933
font.setBold(False)
3034
font.setItalic(False)
@@ -35,7 +39,7 @@ def setupUi(self, AutoSubtitle):
3539
self.Title.setEnabled(True)
3640
self.Title.setGeometry(QtCore.QRect(20, 10, 341, 31))
3741
font = QtGui.QFont()
38-
font.setFamily("等线")
42+
font.setFamily("微软雅黑")
3943
font.setPointSize(15)
4044
font.setKerning(True)
4145
font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferDefault)
@@ -50,13 +54,15 @@ def setupUi(self, AutoSubtitle):
5054
self.OpenFilePathEdit = DragAcceptableQLine(parent=self.centralwidget)
5155
self.OpenFilePathEdit.setGeometry(QtCore.QRect(20, 70, 481, 31))
5256
font = QtGui.QFont()
57+
font.setFamily("微软雅黑")
5358
font.setPointSize(10)
5459
self.OpenFilePathEdit.setFont(font)
5560
self.OpenFilePathEdit.setStatusTip("")
5661
self.OpenFilePathEdit.setObjectName("OpenFilePathEdit")
5762
self.SaveFilePathEdit = QtWidgets.QLineEdit(parent=self.centralwidget)
5863
self.SaveFilePathEdit.setGeometry(QtCore.QRect(20, 110, 481, 31))
5964
font = QtGui.QFont()
65+
font.setFamily("微软雅黑")
6066
font.setPointSize(10)
6167
self.SaveFilePathEdit.setFont(font)
6268
self.SaveFilePathEdit.setObjectName("SaveFilePathEdit")
@@ -67,7 +73,7 @@ def setupUi(self, AutoSubtitle):
6773
self.Title_2.setEnabled(True)
6874
self.Title_2.setGeometry(QtCore.QRect(230, 40, 141, 21))
6975
font = QtGui.QFont()
70-
font.setFamily("等线")
76+
font.setFamily("微软雅黑")
7177
font.setPointSize(13)
7278
font.setKerning(True)
7379
font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferDefault)
@@ -76,21 +82,22 @@ def setupUi(self, AutoSubtitle):
7682
self.setSavePathToDefaultButton = QtWidgets.QPushButton(parent=self.centralwidget)
7783
self.setSavePathToDefaultButton.setGeometry(QtCore.QRect(460, 140, 41, 20))
7884
font = QtGui.QFont()
85+
font.setFamily("微软雅黑")
7986
font.setPointSize(9)
8087
font.setBold(False)
8188
font.setItalic(False)
8289
font.setKerning(True)
8390
self.setSavePathToDefaultButton.setFont(font)
8491
self.setSavePathToDefaultButton.setObjectName("setSavePathToDefaultButton")
8592
self.FlagOPcomboBox = QtWidgets.QComboBox(parent=self.centralwidget)
86-
self.FlagOPcomboBox.setGeometry(QtCore.QRect(530, 10, 71, 22))
93+
self.FlagOPcomboBox.setGeometry(QtCore.QRect(510, 10, 91, 22))
8794
self.FlagOPcomboBox.setObjectName("FlagOPcomboBox")
8895
self.Title_3 = QtWidgets.QLabel(parent=self.centralwidget)
8996
self.Title_3.setEnabled(True)
90-
self.Title_3.setGeometry(QtCore.QRect(370, 10, 151, 21))
97+
self.Title_3.setGeometry(QtCore.QRect(370, 10, 131, 21))
9198
font = QtGui.QFont()
92-
font.setFamily("等线")
93-
font.setPointSize(11)
99+
font.setFamily("微软雅黑")
100+
font.setPointSize(10)
94101
font.setKerning(True)
95102
font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferDefault)
96103
self.Title_3.setFont(font)

GUI_style.ui

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
<verstretch>0</verstretch>
1717
</sizepolicy>
1818
</property>
19+
<property name="font">
20+
<font>
21+
<family>微软雅黑</family>
22+
</font>
23+
</property>
1924
<property name="contextMenuPolicy">
2025
<enum>Qt::NoContextMenu</enum>
2126
</property>
@@ -37,6 +42,7 @@
3742
</property>
3843
<property name="font">
3944
<font>
45+
<family>微软雅黑</family>
4046
<pointsize>12</pointsize>
4147
<italic>false</italic>
4248
<bold>false</bold>
@@ -61,7 +67,7 @@
6167
</property>
6268
<property name="font">
6369
<font>
64-
<family>等线</family>
70+
<family>微软雅黑</family>
6571
<pointsize>15</pointsize>
6672
<stylestrategy>PreferDefault</stylestrategy>
6773
<kerning>true</kerning>
@@ -108,6 +114,7 @@
108114
</property>
109115
<property name="font">
110116
<font>
117+
<family>微软雅黑</family>
111118
<pointsize>10</pointsize>
112119
</font>
113120
</property>
@@ -129,6 +136,7 @@
129136
</property>
130137
<property name="font">
131138
<font>
139+
<family>微软雅黑</family>
132140
<pointsize>10</pointsize>
133141
</font>
134142
</property>
@@ -160,7 +168,7 @@
160168
</property>
161169
<property name="font">
162170
<font>
163-
<family>等线</family>
171+
<family>微软雅黑</family>
164172
<pointsize>13</pointsize>
165173
<stylestrategy>PreferDefault</stylestrategy>
166174
<kerning>true</kerning>
@@ -181,6 +189,7 @@
181189
</property>
182190
<property name="font">
183191
<font>
192+
<family>微软雅黑</family>
184193
<pointsize>9</pointsize>
185194
<italic>false</italic>
186195
<bold>false</bold>
@@ -194,9 +203,9 @@
194203
<widget class="QComboBox" name="FlagOPcomboBox">
195204
<property name="geometry">
196205
<rect>
197-
<x>530</x>
206+
<x>510</x>
198207
<y>10</y>
199-
<width>71</width>
208+
<width>91</width>
200209
<height>22</height>
201210
</rect>
202211
</property>
@@ -209,14 +218,14 @@
209218
<rect>
210219
<x>370</x>
211220
<y>10</y>
212-
<width>151</width>
221+
<width>131</width>
213222
<height>21</height>
214223
</rect>
215224
</property>
216225
<property name="font">
217226
<font>
218-
<family>等线</family>
219-
<pointsize>11</pointsize>
227+
<family>微软雅黑</family>
228+
<pointsize>10</pointsize>
220229
<stylestrategy>PreferDefault</stylestrategy>
221230
<kerning>true</kerning>
222231
</font>

GUI_style_ui.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Form implementation generated from reading ui file 'd:\Code\AutoSubtitle\GUI_style.ui'
22
#
3-
# Created by: PyQt6 UI code generator 6.5.1
3+
# Created by: PyQt6 UI code generator 6.8.0
44
#
55
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
66
# run again. Do not edit this file unless you know what you are doing.
@@ -18,13 +18,17 @@ def setupUi(self, AutoSubtitle):
1818
sizePolicy.setVerticalStretch(0)
1919
sizePolicy.setHeightForWidth(AutoSubtitle.sizePolicy().hasHeightForWidth())
2020
AutoSubtitle.setSizePolicy(sizePolicy)
21+
font = QtGui.QFont()
22+
font.setFamily("微软雅黑")
23+
AutoSubtitle.setFont(font)
2124
AutoSubtitle.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.NoContextMenu)
2225
AutoSubtitle.setUnifiedTitleAndToolBarOnMac(False)
2326
self.centralwidget = QtWidgets.QWidget(parent=AutoSubtitle)
2427
self.centralwidget.setObjectName("centralwidget")
2528
self.startButton = QtWidgets.QPushButton(parent=self.centralwidget)
2629
self.startButton.setGeometry(QtCore.QRect(120, 150, 331, 41))
2730
font = QtGui.QFont()
31+
font.setFamily("微软雅黑")
2832
font.setPointSize(12)
2933
font.setBold(False)
3034
font.setItalic(False)
@@ -35,7 +39,7 @@ def setupUi(self, AutoSubtitle):
3539
self.Title.setEnabled(True)
3640
self.Title.setGeometry(QtCore.QRect(20, 10, 341, 31))
3741
font = QtGui.QFont()
38-
font.setFamily("等线")
42+
font.setFamily("微软雅黑")
3943
font.setPointSize(15)
4044
font.setKerning(True)
4145
font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferDefault)
@@ -50,13 +54,15 @@ def setupUi(self, AutoSubtitle):
5054
self.OpenFilePathEdit = DragAcceptableQLine(parent=self.centralwidget)
5155
self.OpenFilePathEdit.setGeometry(QtCore.QRect(20, 70, 481, 31))
5256
font = QtGui.QFont()
57+
font.setFamily("微软雅黑")
5358
font.setPointSize(10)
5459
self.OpenFilePathEdit.setFont(font)
5560
self.OpenFilePathEdit.setStatusTip("")
5661
self.OpenFilePathEdit.setObjectName("OpenFilePathEdit")
5762
self.SaveFilePathEdit = QtWidgets.QLineEdit(parent=self.centralwidget)
5863
self.SaveFilePathEdit.setGeometry(QtCore.QRect(20, 110, 481, 31))
5964
font = QtGui.QFont()
65+
font.setFamily("微软雅黑")
6066
font.setPointSize(10)
6167
self.SaveFilePathEdit.setFont(font)
6268
self.SaveFilePathEdit.setObjectName("SaveFilePathEdit")
@@ -67,7 +73,7 @@ def setupUi(self, AutoSubtitle):
6773
self.Title_2.setEnabled(True)
6874
self.Title_2.setGeometry(QtCore.QRect(230, 40, 141, 21))
6975
font = QtGui.QFont()
70-
font.setFamily("等线")
76+
font.setFamily("微软雅黑")
7177
font.setPointSize(13)
7278
font.setKerning(True)
7379
font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferDefault)
@@ -76,21 +82,22 @@ def setupUi(self, AutoSubtitle):
7682
self.setSavePathToDefaultButton = QtWidgets.QPushButton(parent=self.centralwidget)
7783
self.setSavePathToDefaultButton.setGeometry(QtCore.QRect(460, 140, 41, 20))
7884
font = QtGui.QFont()
85+
font.setFamily("微软雅黑")
7986
font.setPointSize(9)
8087
font.setBold(False)
8188
font.setItalic(False)
8289
font.setKerning(True)
8390
self.setSavePathToDefaultButton.setFont(font)
8491
self.setSavePathToDefaultButton.setObjectName("setSavePathToDefaultButton")
8592
self.FlagOPcomboBox = QtWidgets.QComboBox(parent=self.centralwidget)
86-
self.FlagOPcomboBox.setGeometry(QtCore.QRect(530, 10, 71, 22))
93+
self.FlagOPcomboBox.setGeometry(QtCore.QRect(510, 10, 91, 22))
8794
self.FlagOPcomboBox.setObjectName("FlagOPcomboBox")
8895
self.Title_3 = QtWidgets.QLabel(parent=self.centralwidget)
8996
self.Title_3.setEnabled(True)
90-
self.Title_3.setGeometry(QtCore.QRect(370, 10, 151, 21))
97+
self.Title_3.setGeometry(QtCore.QRect(370, 10, 131, 21))
9198
font = QtGui.QFont()
92-
font.setFamily("等线")
93-
font.setPointSize(11)
99+
font.setFamily("微软雅黑")
100+
font.setPointSize(10)
94101
font.setKerning(True)
95102
font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferDefault)
96103
self.Title_3.setFont(font)

0 commit comments

Comments
 (0)