From 05302052dea6a80e3cb7641dfefadb7d9d5d31c9 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 16 Dec 2020 17:38:23 +0100 Subject: [PATCH] Fixed a GUI component alignment issue for the text edit popups. --- es-core/src/guis/GuiComplexTextEditPopup.cpp | 5 ++--- es-core/src/guis/GuiTextEditPopup.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/es-core/src/guis/GuiComplexTextEditPopup.cpp b/es-core/src/guis/GuiComplexTextEditPopup.cpp index 81762916d..7c8c02018 100644 --- a/es-core/src/guis/GuiComplexTextEditPopup.cpp +++ b/es-core/src/guis/GuiComplexTextEditPopup.cpp @@ -86,11 +86,10 @@ GuiComplexTextEditPopup::GuiComplexTextEditPopup( if (multiLine) textHeight *= 6; - mText->setSize(0, textHeight); - setSize(Renderer::getScreenWidth() * 0.75f,mTitle->getFont()->getHeight() + - textHeight + mButtonGrid->getSize().y() + 220); + setSize(Renderer::getScreenWidth() * 0.75f, mTitle->getFont()->getHeight() + + textHeight + mButtonGrid->getSize().y() + mButtonGrid->getSize().y() * 1.85); setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, (Renderer::getScreenHeight() - mSize.y()) / 2); mText->startEditing(); diff --git a/es-core/src/guis/GuiTextEditPopup.cpp b/es-core/src/guis/GuiTextEditPopup.cpp index b80039113..899321f54 100644 --- a/es-core/src/guis/GuiTextEditPopup.cpp +++ b/es-core/src/guis/GuiTextEditPopup.cpp @@ -63,7 +63,7 @@ GuiTextEditPopup::GuiTextEditPopup( mText->setSize(0, textHeight); setSize(Renderer::getScreenWidth() * 0.5f, mTitle->getFont()->getHeight() + - textHeight + mButtonGrid->getSize().y() + 40); + textHeight + mButtonGrid->getSize().y() + mButtonGrid->getSize().y() / 2); setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, (Renderer::getScreenHeight() - mSize.y()) / 2); mText->startEditing();