mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Made the scraper GUIs narrower on ultrawide monitors.
This commit is contained in:
parent
6e28300a5a
commit
6627899f88
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue