From 9f24df9a1cedff5e5f5f67fc0fdfbdb40c519c3f Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sun, 9 Aug 2026 20:44:03 +0300 Subject: [PATCH] fix select 'select' mode list width --- src/graphics/ui/elements/SelectBox.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/graphics/ui/elements/SelectBox.cpp b/src/graphics/ui/elements/SelectBox.cpp index 1ac09ad24..0a6940943 100644 --- a/src/graphics/ui/elements/SelectBox.cpp +++ b/src/graphics/ui/elements/SelectBox.cpp @@ -21,7 +21,11 @@ SelectBox::SelectBox( options(std::move(options)), mode(mode) { listenAction(UIAction::CLICK, [this, contentWidth](GUI& gui) { auto panel = std::make_shared( - gui, glm::vec2 {contentWidth, contentWidth}, glm::vec4 {2.0f}, 0.0f + gui, + getMode() == Mode::BUTTON ? glm::vec2 {contentWidth, contentWidth} + : getSize(), + glm::vec4 {2.0f}, + 0.0f ); panel->setColor({}); panel->setPadding(glm::vec4(0, size.y, 0, 0));