Fix Qt scaling (#236)
As it appeared, Qt scaling was never working since Kotato settings are read after option value is checked
This commit is contained in:
parent
7c535a9888
commit
b80777c6d2
1 changed files with 6 additions and 5 deletions
|
|
@ -295,11 +295,7 @@ void Launcher::init() {
|
||||||
initQtMessageLogging();
|
initQtMessageLogging();
|
||||||
|
|
||||||
QApplication::setApplicationName(qsl("KotatogramDesktop"));
|
QApplication::setApplicationName(qsl("KotatogramDesktop"));
|
||||||
if (cQtScale()) {
|
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
|
||||||
} else {
|
|
||||||
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// fallback session management is useless for tdesktop since it doesn't have
|
// fallback session management is useless for tdesktop since it doesn't have
|
||||||
// any "are you sure you want to close this window?" dialogs
|
// any "are you sure you want to close this window?" dialogs
|
||||||
|
|
@ -325,6 +321,11 @@ int Launcher::exec() {
|
||||||
Logs::start(this);
|
Logs::start(this);
|
||||||
Kotato::JsonSettings::Start();
|
Kotato::JsonSettings::Start();
|
||||||
|
|
||||||
|
if (cQtScale()) {
|
||||||
|
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, false);
|
||||||
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (Logs::DebugEnabled()) {
|
if (Logs::DebugEnabled()) {
|
||||||
const auto openalLogPath = QDir::toNativeSeparators(
|
const auto openalLogPath = QDir::toNativeSeparators(
|
||||||
cWorkingDir() + qsl("DebugLogs/last_openal_log.txt"));
|
cWorkingDir() + qsl("DebugLogs/last_openal_log.txt"));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue