Browse Source

fix

Signed-off-by: crueter <crueter@eden-emu.dev>
pull/2929/head
crueter 3 months ago
parent
commit
a0d835b766
  1. 14
      src/yuzu/main.cpp
  2. 12
      src/yuzu/main_window.cpp
  3. 3
      src/yuzu/main_window.h

14
src/yuzu/main.cpp

@ -16,6 +16,20 @@
#include "main_window.h"
#ifdef _WIN32
#include <QScreen>
static void OverrideWindowsFont() {
// Qt5 chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrillic characters
// Asking to use "MS Shell Dlg 2" gives better other chars while leaving the Chinese Characters.
const QString startup_font = QApplication::font().family();
const QStringList ugly_fonts = {QStringLiteral("SimSun"), QStringLiteral("PMingLiU")};
if (ugly_fonts.contains(startup_font)) {
QApplication::setFont(QFont(QStringLiteral("MS Shell Dlg 2"), 9, QFont::Normal));
}
}
#endif
static void SetHighDPIAttributes() {
#ifdef _WIN32
// For Windows, we want to avoid scaling artifacts on fractional scaling ratios.

12
src/yuzu/main_window.cpp

@ -352,18 +352,6 @@ static QString PrettyProductName() {
return QSysInfo::prettyProductName();
}
#ifdef _WIN32
static void OverrideWindowsFont() {
// Qt5 chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrillic characters
// Asking to use "MS Shell Dlg 2" gives better other chars while leaving the Chinese Characters.
const QString startup_font = QApplication::font().family();
const QStringList ugly_fonts = {QStringLiteral("SimSun"), QStringLiteral("PMingLiU")};
if (ugly_fonts.contains(startup_font)) {
QApplication::setFont(QFont(QStringLiteral("MS Shell Dlg 2"), 9, QFont::Normal));
}
}
#endif
#ifndef _WIN32
// TODO(crueter): carboxyl does this, is it needed in qml?
inline static bool isDarkMode() {

3
src/yuzu/main_window.h

@ -29,6 +29,7 @@
#include <QDBusObjectPath>
#include <QVariant>
#include <QtDBus/QDBusInterface>
#include <QSocketNotifier>
#endif
#ifdef ENABLE_UPDATE_CHECKER
@ -568,7 +569,7 @@ private:
#ifdef __unix__
QSocketNotifier* sig_interrupt_notifier;
static std::array<int, 3> sig_interrupt_fds;
static std::array<int, 3> sig_interrupt_QSocketNotifds;
#endif
std::filesystem::path GetEdenCommand();

Loading…
Cancel
Save