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

@ -1616,8 +1616,9 @@ function EWorldEditor::maxSize(%this, %window)
%fixedWindow = EWTreeWindow;
%fluidWindow = EWInspectorWindow;
%top = EditorGuiToolbar.extent.y + 6 + 19;
%bottom = %top + 65 - 6;
%offset = 25; // tweak the vertical offset so that it aligns neatly
%top = EditorGuiToolbar.extent.y + %offset;
%bottom = %top + 59;
%maxHeight = Canvas.extent.y - %top - %bottom + 12;
// --- Fixed window (top) ------------------------------------------------

View file

@ -596,8 +596,9 @@ function TerrainPainterContainer::maxSize(%this, %window)
%fixedWindow = EPainterPreview;
%fluidWindow = EPainter;
%top = EditorGuiToolbar.extent.y + 6 - 7 + 24;
%bottom = %top + 65 - 6;
%offset = 23; // 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) ------------------------------------------------