Skip to content

Commit 56304a7

Browse files
committed
fix: 缩小字体设置范围;
1 parent 57bd7b7 commit 56304a7

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

lang/zh_CN/winghex_zh_CN.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5133,7 +5133,7 @@
51335133
<context>
51345134
<name>SettingManager</name>
51355135
<message>
5136-
<location filename="../../src/class/settingmanager.cpp" line="216"/>
5136+
<location filename="../../src/class/settingmanager.cpp" line="217"/>
51375137
<source>ConfigUnableSave</source>
51385138
<translation>程序将无法保存配置,请检查配置文件权限。</translation>
51395139
</message>

lang/zh_TW/winghex_zh_TW.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5133,7 +5133,7 @@
51335133
<context>
51345134
<name>SettingManager</name>
51355135
<message>
5136-
<location filename="../../src/class/settingmanager.cpp" line="216"/>
5136+
<location filename="../../src/class/settingmanager.cpp" line="217"/>
51375137
<source>ConfigUnableSave</source>
51385138
<translation>程式將無法保存配置,請檢查配置檔許可權。</translation>
51395139
</message>

src/class/settingmanager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ void SettingManager::load() {
120120
READ_CONFIG_BOOL(m_enablePlgInRoot, PLUGIN_ENABLE_ROOT, false);
121121
READ_CONFIG_INT_POSITIVE(m_editorfontSize, EDITOR_FONTSIZE,
122122
defaultFontSize);
123+
m_editorfontSize = qBound(5, m_editorfontSize, 25);
123124
READ_CONFIG_BOOL(m_editorShowHeader, EDITOR_SHOW_ADDR, true);
124125
READ_CONFIG_BOOL(m_editorShowcol, EDITOR_SHOW_COL, true);
125126
READ_CONFIG_BOOL(m_editorShowtext, EDITOR_SHOW_TEXT, true);

src/settings/generalsettingdialog.ui

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@
129129
<item row="1" column="1">
130130
<widget class="QSpinBox" name="sbFontSize">
131131
<property name="minimum">
132-
<number>10</number>
132+
<number>5</number>
133133
</property>
134134
<property name="maximum">
135-
<number>50</number>
135+
<number>25</number>
136136
</property>
137137
</widget>
138138
</item>
@@ -192,7 +192,7 @@
192192
<string notr="true">-</string>
193193
</property>
194194
<property name="alignment">
195-
<set>Qt::AlignCenter</set>
195+
<set>Qt::AlignmentFlag::AlignCenter</set>
196196
</property>
197197
<property name="wordWrap">
198198
<bool>true</bool>
@@ -212,7 +212,7 @@
212212
<string notr="true">-</string>
213213
</property>
214214
<property name="alignment">
215-
<set>Qt::AlignCenter</set>
215+
<set>Qt::AlignmentFlag::AlignCenter</set>
216216
</property>
217217
<property name="wordWrap">
218218
<bool>true</bool>
@@ -232,7 +232,7 @@
232232
<string notr="true">-</string>
233233
</property>
234234
<property name="alignment">
235-
<set>Qt::AlignCenter</set>
235+
<set>Qt::AlignmentFlag::AlignCenter</set>
236236
</property>
237237
<property name="wordWrap">
238238
<bool>true</bool>
@@ -252,7 +252,7 @@
252252
<string notr="true">-</string>
253253
</property>
254254
<property name="alignment">
255-
<set>Qt::AlignCenter</set>
255+
<set>Qt::AlignmentFlag::AlignCenter</set>
256256
</property>
257257
<property name="wordWrap">
258258
<bool>true</bool>
@@ -265,7 +265,7 @@
265265
<item>
266266
<spacer name="verticalSpacer">
267267
<property name="orientation">
268-
<enum>Qt::Vertical</enum>
268+
<enum>Qt::Orientation::Vertical</enum>
269269
</property>
270270
<property name="sizeHint" stdset="0">
271271
<size>

0 commit comments

Comments
 (0)