diff options
author | Liam <byteslice@airmail.cc> | 2022-12-21 19:27:11 -0500 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-12-21 19:27:11 -0500 |
commit | ae6015a69b211a98f9ef97d73b5c301c359ca35f (patch) | |
tree | a3404e7ab91e203a4f390dd6367160e6fee775df /src/yuzu/util | |
parent | 053ad04d3f50ec9bca40e48487e4a0cda9b320f4 (diff) |
qt: use main window as close overlay parent
Diffstat (limited to 'src/yuzu/util')
-rw-r--r-- | src/yuzu/util/overlay_dialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/yuzu/util/overlay_dialog.cpp b/src/yuzu/util/overlay_dialog.cpp index 25fa789ac..796f5bf41 100644 --- a/src/yuzu/util/overlay_dialog.cpp +++ b/src/yuzu/util/overlay_dialog.cpp @@ -3,6 +3,7 @@ #include <QKeyEvent> #include <QScreen> +#include <QWindow> #include "core/core.h" #include "core/hid/hid_types.h" @@ -162,7 +163,7 @@ void OverlayDialog::MoveAndResizeWindow() { const auto height = static_cast<float>(parentWidget()->height()); // High DPI - const float dpi_scale = qApp->screenAt(pos)->logicalDotsPerInch() / 96.0f; + const float dpi_scale = parentWidget()->windowHandle()->screen()->logicalDotsPerInch() / 96.0f; const auto title_text_font_size = BASE_TITLE_FONT_SIZE * (height / BASE_HEIGHT) / dpi_scale; const auto body_text_font_size = |