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

@ -276,8 +276,9 @@ function ConvexEditorGui::maxSize(%this, %window)
%this.resizing = false;
%fluidWindow = ConvexEditorOptionsWindow;
%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;
%position = Canvas.extent.x - %fluidWindow.extent.x SPC %top;
%extent = %window.extent.x SPC Canvas.extent.y - %bottom;