From 54dee3ac57252b367ec22c69f2b4cd1aa4f1a423 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 23 Sep 2024 18:47:41 +0200 Subject: [PATCH] Made two text label fields wider in the scraper credentials menu --- es-app/src/guis/GuiSettings.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/es-app/src/guis/GuiSettings.cpp b/es-app/src/guis/GuiSettings.cpp index 9aacf62f6..debb9cd54 100644 --- a/es-app/src/guis/GuiSettings.cpp +++ b/es-app/src/guis/GuiSettings.cpp @@ -200,9 +200,13 @@ void GuiSettings::addEditableTextComponent(const std::string label, auto lbl = std::make_shared(Utils::String::toUpper(label), Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary, ALIGN_LEFT, ALIGN_CENTER, glm::ivec2 {0, 0}); - row.addElement(lbl, true); + row.addElement(lbl, false); row.addElement(ed, true); + const float maxLabelWidth {mMenu.getSize().x * 0.65f}; + lbl->setSize(glm::clamp(lbl->getTextCache()->metrics.size.x, 0.0f, maxLabelWidth), + lbl->getSize().y); + auto spacer = std::make_shared(); spacer->setSize(Renderer::getScreenWidth() * 0.005f, 0.0f); row.addElement(spacer, false);