fix for small screens
This commit is contained in:
parent
6e60410e73
commit
958a5f0d81
2 changed files with 10 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue