mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-18 02:30:45 -04:00
fix(overhaul): UI and resolution bugs for Steam Deck (Gamescope)
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -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));
|
||||||
|
|||||||
Reference in New Issue
Block a user