diff --git a/es-app/src/guis/GuiGameScraper.cpp b/es-app/src/guis/GuiGameScraper.cpp index 1556daa95..91fb0b454 100644 --- a/es-app/src/guis/GuiGameScraper.cpp +++ b/es-app/src/guis/GuiGameScraper.cpp @@ -118,7 +118,12 @@ GuiGameScraper::GuiGameScraper( doneFunc(result); close(); }); mSearch->setCancelCallback([&] { delete this; }); - setSize(Renderer::getScreenWidth() * 0.95f, Renderer::getScreenHeight() * 0.747f); + // Limit the width of the GUI on ultrawide monitors. The 1.778 aspect ratio value is + // the 16:9 reference. + float aspectValue = 1.778f / Renderer::getScreenAspectRatio(); + float width = Math::clamp(0.95f * aspectValue, 0.70f, 0.95f) * Renderer::getScreenWidth(); + + setSize(width, Renderer::getScreenHeight() * 0.747f); setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, (Renderer::getScreenHeight() - mSize.y()) / 2); diff --git a/es-app/src/guis/GuiScraperMulti.cpp b/es-app/src/guis/GuiScraperMulti.cpp index f0196465f..20a459762 100644 --- a/es-app/src/guis/GuiScraperMulti.cpp +++ b/es-app/src/guis/GuiScraperMulti.cpp @@ -95,7 +95,12 @@ GuiScraperMulti::GuiScraperMulti( mButtonGrid = makeButtonGrid(mWindow, buttons); mGrid.setEntry(mButtonGrid, Vector2i(0, 4), true, false); - setSize(Renderer::getScreenWidth() * 0.95f, Renderer::getScreenHeight() * 0.849f); + // Limit the width of the GUI on ultrawide monitors. The 1.778 aspect ratio value is + // the 16:9 reference. + float aspectValue = 1.778f / Renderer::getScreenAspectRatio(); + float width = Math::clamp(0.95f * aspectValue, 0.70f, 0.95f) * Renderer::getScreenWidth(); + + setSize(width, Renderer::getScreenHeight() * 0.849f); setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, (Renderer::getScreenHeight() - mSize.y()) / 2);