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:37 +00:00
parent 2452c9ee9b
commit d3de927820

View File

@@ -9,14 +9,21 @@
#include "citron/about_dialog.h" #include "citron/about_dialog.h"
AboutDialog::AboutDialog(QWidget* parent) AboutDialog::AboutDialog(QWidget* parent)
: QDialog(parent), ui{std::make_unique<Ui::AboutDialog>()} { : QDialog(parent) {
const bool is_gamescope = !qgetenv("GAMESCOPE_WIDTH").isEmpty() || qgetenv("XDG_CURRENT_DESKTOP") == "gamescope";
if (is_gamescope) {
setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
}
std::string citron_build_version = "citron | 0.12.25"; std::string citron_build_version = "citron | 0.12.25";
#ifdef CITRON_ENABLE_PGO_USE #ifdef CITRON_ENABLE_PGO_USE
citron_build_version += " | PGO"; citron_build_version += " | PGO";
#endif #endif
ui = std::make_unique<Ui::AboutDialog>();
ui->setupUi(this); ui->setupUi(this);
// Try and request the icon from Qt theme (Linux?)
const QIcon citron_logo = QIcon::fromTheme(QStringLiteral("org.citron_emu.citron")); const QIcon citron_logo = QIcon::fromTheme(QStringLiteral("org.citron_emu.citron"));
if (!citron_logo.isNull()) { if (!citron_logo.isNull()) {
ui->labelLogo->setPixmap(citron_logo.pixmap(200)); ui->labelLogo->setPixmap(citron_logo.pixmap(200));