fix(overhaul): UI and resolution bugs for Steam Deck (Gamescope)

Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
Collecting
2026-01-04 18:32:02 +00:00
parent 91d47a24f0
commit 2452c9ee9b

View File

@@ -220,9 +220,16 @@ void UpdaterDialog::OnRestartButtonClicked() {
}
void UpdaterDialog::SetupUI() {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
const bool is_gamescope = !qgetenv("GAMESCOPE_WIDTH").isEmpty() || qgetenv("XDG_CURRENT_DESKTOP") == "gamescope";
setMinimumSize(size());
if (is_gamescope) {
// Force as a top-level window so Gamescope centers it correctly at 800p
setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowStaysOnTopHint);
// Do NOT set a minimum size based on desktop hints, let the layout work
} else {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setMinimumSize(size());
}
ui->currentVersionValue->setText(QString::fromStdString(updater_service->GetCurrentVersion()));
ui->appImageSelectorLabel->setVisible(false);