From fe5e3ad5d422135beacb65263aff9b78818cc4d5 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 14 Oct 2021 21:47:32 +0200 Subject: [PATCH] The alternative emulators GUI now looks good at all resolutions. --- es-app/src/guis/GuiAlternativeEmulators.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/es-app/src/guis/GuiAlternativeEmulators.cpp b/es-app/src/guis/GuiAlternativeEmulators.cpp index 50420a17b..e19de6ef9 100644 --- a/es-app/src/guis/GuiAlternativeEmulators.cpp +++ b/es-app/src/guis/GuiAlternativeEmulators.cpp @@ -39,13 +39,6 @@ GuiAlternativeEmulators::GuiAlternativeEmulators(Window* window) ComponentListRow row; - // This transparent bracket is only added to generate a left margin. - auto bracket = std::make_shared(mWindow); - bracket->setImage(":/graphics/arrow.svg"); - bracket->setOpacity(0); - bracket->setSize(bracket->getSize() / 3.0f); - row.addElement(bracket, false); - std::string name = (*it)->getName(); std::shared_ptr systemText = std::make_shared(mWindow, name, Font::get(FONT_SIZE_MEDIUM), 0x777777FF); @@ -94,7 +87,9 @@ GuiAlternativeEmulators::GuiAlternativeEmulators(Window* window) labelText->setColor(TEXTCOLOR_SCRAPERMARKED); mCommandRows[name] = labelText; - labelText->setSize(labelSizeX, labelText->getSize().y); + labelText->setSize(mMenu.getSize().x - systemSizeX - + 20.0f * Renderer::getScreenHeightModifier(), + systemText->getSize().y); row.addElement(labelText, false); row.makeAcceptInputHandler([this, it, labelText] { @@ -157,6 +152,7 @@ void GuiAlternativeEmulators::selectorWindow(SystemData* system) std::shared_ptr labelText = std::make_shared( mWindow, label, Font::get(FONT_SIZE_MEDIUM), 0x777777FF, ALIGN_LEFT); + labelText->setSelectable(true); if (system->getSystemEnvData()->mLaunchCommands.front().second == label) labelText->setValue(labelText->getValue().append(" [DEFAULT]")); @@ -193,13 +189,6 @@ void GuiAlternativeEmulators::selectorWindow(SystemData* system) delete s; }); - // This transparent bracket is only added to generate the correct help prompts. - auto bracket = std::make_shared(mWindow); - bracket->setImage(":/graphics/arrow.svg"); - bracket->setOpacity(0); - bracket->setSize(bracket->getSize() / 3.0f); - row.addElement(bracket, false); - // Select the row that corresponds to the selected label. if (selectedLabel == label) s->addRow(row, true);