OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

TGMC: Bad DMF `pos` handling shrinks the UI

Open ike709 opened this issue 1 year ago • 1 comments

On TGMC, the UI gets shrunk to a small fraction of the window:

image

This is due to the following proc:

/client/proc/set_fullscreen(fullscreen_mode) // Note: fullscreen_mode is false
	if(fullscreen_mode)
		winset(src, "mainwindow", "is-maximized=false;can-resize=false;titlebar=false")
		winset(src, "mainwindow", "menu=null;statusbar=false")
		winset(src, "mainwindow.split", "pos=0x0")
		winset(src, "mainwindow", "is-maximized=true")
		return
	winset(src, "mainwindow", "is-maximized=false;can-resize=true;titlebar=true")
	winset(src, "mainwindow", "menu=menu;statusbar=true")
	winset(src, "mainwindow.split", "pos=3x0") // This is the problematic line. Commenting it out fixes the issue.
	winset(src, "mainwindow", "is-maximized=true")

Something is up with pos handling.

ike709 avatar Oct 15 '24 21:10 ike709