fix for small screens

This commit is contained in:
Nishi 2026-05-15 02:29:47 +09:00
commit 958a5f0d81
2 changed files with 10 additions and 2 deletions

View file

@ -107,6 +107,9 @@ void gui_init(void) {
} else if(rc.width >= 1024 && rc.height >= 768) {
w = 800;
h = 600;
}else if(rc.width >= 640 && rc.height >= 480){
w = 640 * 3 / 4;
h = 480 * 3 / 4;
} else {
w = 640;
h = 480;

View file

@ -64,11 +64,16 @@ void gui_version(void) {
MwLLPixmap px = MwLoadIcon(window, icon_midas);
MwSizeHints sh;
MwGetScreenSize(window, &rc);
if(rc.width <= 640 && rc.height <= 480){
w /= 2;
h /= 2;
}
sh.min_width = sh.max_width = w;
sh.min_height = sh.max_height = h;
MwGetScreenSize(window, &rc);
version = MwVaCreateWidget(MwWindowClass, "window", NULL, x + (ww - w) / 2, y + (wh - h) / 2, w, h,
MwNtitle, "Version information",
MwNsizeHints, &sh,