From 958a5f0d810c1ff9c4aa90688a7dbbb44a7ae1da Mon Sep 17 00:00:00 2001 From: Nishi Date: Fri, 15 May 2026 02:29:47 +0900 Subject: [PATCH] fix for small screens --- src/gui.c | 3 +++ src/gui_version.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gui.c b/src/gui.c index fa2f276..af15670 100644 --- a/src/gui.c +++ b/src/gui.c @@ -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; diff --git a/src/gui_version.c b/src/gui_version.c index de5af47..8aa47f2 100644 --- a/src/gui_version.c +++ b/src/gui_version.c @@ -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,