Sanitize the window resizing scripts

Instead of magic numbers using a variable with comment so it's clear what is does.
This commit is contained in:
Nils Eikelenboom 2024-09-13 20:14:43 +02:00
parent ce8a10ba0a
commit 491f2e8bac
14 changed files with 42 additions and 28 deletions

View file

@ -284,8 +284,9 @@ function MaterialEditorGui::maxSize(%this, %window)
%fixedWindow = MaterialEditorPreviewWindow;
%fluidWindow = MaterialEditorPropertiesWindow;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%offset = -1; // tweak the vertical offset so that it aligns neatly
%top = EditorGuiToolbar.extent.y + %offset;
%bottom = %top + 59;
%maxHeight = Canvas.extent.y - %top - %bottom;
// --- Fixed window (top) ------------------------------------------------