mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 11:07:46 +01:00
[TGUI v6] Migration to CSS Variables, styles refactor & React 19 (#17487)
* Initial Port of tg's tgui 2.0 * initial * first UI fixes * fix retro theme * rd console * wiki theme * better tgui say handling * Ui scaling port * smaller gap * guh * reset subcats on main cat change * blink a bit later * tofixed * fixed * currently not fully supported * increase that * fix powermonitor chart * typescript up * tgui core up
This commit is contained in:
+14
-2
@@ -71,6 +71,14 @@
|
||||
for (file in stylesheets)
|
||||
head_content += "<link rel='stylesheet' type='text/css' href='[SSassets.transport.get_asset_url(file)]'>"
|
||||
|
||||
if(user.client?.window_scaling && user.client?.window_scaling != 1 && !user.client?.prefs.read_preference(/datum/preference/toggle/ui_scale) && width && height)
|
||||
head_content += {"
|
||||
<style>
|
||||
body {
|
||||
zoom: [100 / user.client?.window_scaling]%;
|
||||
}
|
||||
</style>
|
||||
"}
|
||||
|
||||
for (file in scripts)
|
||||
head_content += "<script type='text/javascript' src='[SSassets.transport.get_asset_url(file)]'></script>"
|
||||
@@ -108,8 +116,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)
|
||||
|
||||
Reference in New Issue
Block a user