mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Avoid resizing chat to nothing in the Fit Viewport verb (#646)
* Avoid resizing chat to nothing in the Fit Viewport verb (#53393) * Avoid resizing chat to nothing in the Fit Viewport verb Co-authored-by: Tad Hardesty <tad@platymuus.com>
This commit is contained in:
co-authored by
Tad Hardesty
parent
a57b592fe5
commit
7c8de9b945
@@ -339,6 +339,9 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
var/split_size = splittext(sizes["mainwindow.split.size"], "x")
|
||||
var/split_width = text2num(split_size[1])
|
||||
|
||||
// Avoid auto-resizing the statpanel and chat into nothing.
|
||||
desired_width = min(desired_width, split_width - 300)
|
||||
|
||||
// Calculate and apply a best estimate
|
||||
// +4 pixels are for the width of the splitter's handle
|
||||
var/pct = 100 * (desired_width + 4) / split_width
|
||||
|
||||
Reference in New Issue
Block a user