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();
|
||||
|
||||
QApplication::setApplicationName(qsl("KotatogramDesktop"));
|
||||
if (cQtScale()) {
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
||||
} else {
|
||||
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
||||
}
|
||||
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
||||
|
||||
// fallback session management is useless for tdesktop since it doesn't have
|
||||
// any "are you sure you want to close this window?" dialogs
|
||||
|
|
@ -325,6 +321,11 @@ int Launcher::exec() {
|
|||
Logs::start(this);
|
||||
Kotato::JsonSettings::Start();
|
||||
|
||||
if (cQtScale()) {
|
||||
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, false);
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
||||
}
|
||||
|
||||
if (Logs::DebugEnabled()) {
|
||||
const auto openalLogPath = QDir::toNativeSeparators(
|
||||
cWorkingDir() + qsl("DebugLogs/last_openal_log.txt"));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue