From 385fa4d36c1a7cea157f2adfa349cc51cedf53b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Tue, 24 Jan 2023 21:15:47 +0100 Subject: [PATCH] Slightly decrease width of name editbox if total width is low --- src/game/editor/editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 2d3918331..fefbd6da7 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -4923,7 +4923,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View) UI()->DoLabel(&Button, "Name:", 10.0f, TEXTALIGN_RIGHT); ToolBar.VSplitLeft(3.0f, nullptr, &ToolBar); - ToolBar.VSplitLeft(80.0f, &Button, &ToolBar); + ToolBar.VSplitLeft(ToolBar.w > ToolBar.h * 40 ? 80.0f : 60.0f, &Button, &ToolBar); static float s_NameBox = 0; if(DoEditBox(&s_NameBox, &Button, pEnvelope->m_aName, sizeof(pEnvelope->m_aName), 10.0f, &s_NameBox, false, IGraphics::CORNER_ALL, "The name of the selected envelope"))