Made two text label fields wider in the scraper credentials menu

This commit is contained in:
Leon Styhre 2024-09-23 18:47:41 +02:00
parent bc13c93c53
commit 54dee3ac57

View file

@ -200,9 +200,13 @@ void GuiSettings::addEditableTextComponent(const std::string label,
auto lbl = std::make_shared<TextComponent>(Utils::String::toUpper(label), auto lbl = std::make_shared<TextComponent>(Utils::String::toUpper(label),
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary, Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary,
ALIGN_LEFT, ALIGN_CENTER, glm::ivec2 {0, 0}); ALIGN_LEFT, ALIGN_CENTER, glm::ivec2 {0, 0});
row.addElement(lbl, true); row.addElement(lbl, false);
row.addElement(ed, true); 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<GuiComponent>(); auto spacer = std::make_shared<GuiComponent>();
spacer->setSize(Renderer::getScreenWidth() * 0.005f, 0.0f); spacer->setSize(Renderer::getScreenWidth() * 0.005f, 0.0f);
row.addElement(spacer, false); row.addElement(spacer, false);