Skip to content

Commit 206ae49

Browse files
committed
Add extra width to Changelist window according to theme
1 parent 12450f7 commit 206ae49

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scripts/draw_window_update/draw_window_update.gml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ function draw_window_update() {
1515
}
1616
return 0
1717
}
18-
x1 = floor(rw / 2 - 250)
18+
var theme_offset = (theme == 3 ? 0 : 20) // Add extra width to account for the wider font on non-Fluent themes
19+
x1 = floor(rw / 2 - 250) - theme_offset / 2
1920
y1 = floor(rh / 2 - 200) + windowoffset
20-
draw_window(x1, y1, x1 + 500, y1 + 400)
21+
draw_window(x1, y1, x1 + 500 + theme_offset, y1 + 400)
2122
draw_theme_font(font_main_bold)
2223

2324
if (language != 1) {
@@ -46,7 +47,7 @@ function draw_window_update() {
4647
draw_text_dynamic(x1 + 32, y1 + 32, "感谢你更新到 " + version + " 版本!")
4748
}
4849
}
49-
draw_area(x1 + 16, y1 + 58, x1 + 487, y1 + 357)
50+
draw_area(x1 + 16, y1 + 58, x1 + 487 + theme_offset, y1 + 357)
5051
n = string_count("\n", fullstr)
5152
for (a = 0; a < n; a += 1) {
5253
str[a] = string_copy(fullstr, 1, string_pos("\n", fullstr) - 1)
@@ -62,11 +63,11 @@ function draw_window_update() {
6263
else draw_text_transformed(x1 + 32, y1 + 64 + 16 * (a - sb_val[update_scrollbar]), str[a], 0.25, 0.25, 0)
6364
}
6465
draw_theme_font(font_main)
65-
draw_scrollbar(update_scrollbar, x1 + 470, y1 + 60, 12, 22, n, 0, 1)
66+
draw_scrollbar(update_scrollbar, x1 + 470 + theme_offset, y1 + 60, 12, 22, n, 0, 1)
6667
if (draw_button2(x1 + 16, y1 + 365, 96, condstr(language != 1, "Older versions...", "查看更旧版本…"))) {
6768
open_url(link_changelog)
6869
}
69-
if (draw_button2(x1 + 487 - 72, y1 + 365, 72, condstr(language != 1, "OK", "确认")) && (windowopen = 1 || theme != 3)) {
70+
if (draw_button2(x1 + 487 - 72 + theme_offset, y1 + 365, 72, condstr(language != 1, "OK", "确认")) && (windowopen = 1 || theme != 3)) {
7071
if (window = w_update) {
7172
window = w_greeting
7273
save_settings() // Save new version number

0 commit comments

Comments
 (0)