diff --git a/code/datums/browser.dm b/code/datums/browser.dm index 360420ab00b..5bfaa5ea3c8 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -68,6 +68,14 @@ for (file in stylesheets) head_content += "" + if(user.client?.window_scaling && user.client?.window_scaling != 1 && !user.client?.prefs.read_preference(/datum/preference/toggle/ui_scale) && width && height) + head_content += {" + + "} for (file in scripts) head_content += "" @@ -105,8 +113,12 @@ to_chat(user, span_userdanger("The [title] browser you tried to open failed a sanity check! Please report this on GitHub!")) return var/window_size = "" - if (width && height) - window_size = "size=[width]x[height];" + if(width && height) + if(user.client?.prefs?.read_preference(/datum/preference/toggle/ui_scale)) + var/scaling = user.client.window_scaling + window_size = "size=[width * scaling]x[height * scaling];" + else + window_size = "size=[width]x[height];" var/datum/asset/simple/namespaced/common/common_asset = get_asset_datum(/datum/asset/simple/namespaced/common) common_asset.send(user) if (stylesheets.len) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 36b6a5b2c4a..c6cd2387cc6 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -4,10 +4,14 @@ log_admin("[key_name(usr)] checked the player panel.") var/dat = "Player Panel" + var/ui_scale = owner.prefs.read_preference(/datum/preference/toggle/ui_scale) + //javascript, the part that does most of the work~ dat += {" + [!ui_scale && owner.window_scaling ? "" : ""] +