From cca065f0f9d98c320dce84b28cc4b0eeb1529a3a Mon Sep 17 00:00:00 2001 From: fourtf Date: Mon, 18 Dec 2017 02:47:01 +0100 Subject: [PATCH] disabled non client dpi scaling until issue is fixed --- src/main.cpp | 4 ++-- src/widgets/accountpopup.cpp | 4 ++-- src/widgets/accountpopup.hpp | 2 +- src/widgets/basewidget.cpp | 7 +++---- src/widgets/basewidget.hpp | 2 +- src/widgets/settingsdialog.cpp | 4 ++-- src/widgets/settingsdialog.hpp | 2 +- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 7f13c84cd..bd8ee1582 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,8 +31,8 @@ public: EnableNonClientDpiScaling enableNonClientDpiScaling = (EnableNonClientDpiScaling)user32.resolve("EnableNonClientDpiScaling"); - if (enableNonClientDpiScaling) - enableNonClientDpiScaling(msg->hwnd); + // if (enableNonClientDpiScaling) + // enableNonClientDpiScaling(msg->hwnd); } } return false; diff --git a/src/widgets/accountpopup.cpp b/src/widgets/accountpopup.cpp index 9d1a566aa..2bc8373e7 100644 --- a/src/widgets/accountpopup.cpp +++ b/src/widgets/accountpopup.cpp @@ -123,7 +123,7 @@ AccountPopupWidget::AccountPopupWidget(std::shared_ptr channel) util::twitch::getUserID(userNickname, this, [=](const QString &id) { currentTwitchUser->setUserId(id); }); - this->dpiMultiplyerChanged(this->getDpiMultiplier(), this->getDpiMultiplier()); + this->dpiMultiplierChanged(this->getDpiMultiplier(), this->getDpiMultiplier()); } void AccountPopupWidget::setName(const QString &name) @@ -200,7 +200,7 @@ void AccountPopupWidget::updatePermissions() } } -void AccountPopupWidget::dpiMultiplyerChanged(float oldDpi, float newDpi) +void AccountPopupWidget::dpiMultiplierChanged(float oldDpi, float newDpi) { this->setStyleSheet(QString("* { font-size: px; }") .replace("", QString::number((int)(12 * newDpi)))); diff --git a/src/widgets/accountpopup.hpp b/src/widgets/accountpopup.hpp index d36e6c047..8af860d20 100644 --- a/src/widgets/accountpopup.hpp +++ b/src/widgets/accountpopup.hpp @@ -31,7 +31,7 @@ public: void updatePermissions(); protected: - virtual void dpiMultiplyerChanged(float oldDpi, float newDpi) override; + virtual void dpiMultiplierChanged(float oldDpi, float newDpi) override; private: Ui::AccountPopup *_ui; diff --git a/src/widgets/basewidget.cpp b/src/widgets/basewidget.cpp index 574f38d68..597e0e7b7 100644 --- a/src/widgets/basewidget.cpp +++ b/src/widgets/basewidget.cpp @@ -2,10 +2,9 @@ #include "colorscheme.hpp" #include "settingsmanager.hpp" -//#include #include -//#include -//#include +#include +#include #include #include "util/nativeeventhelper.hpp" @@ -91,7 +90,7 @@ bool BaseWidget::nativeEvent(const QByteArray &eventType, void *message, long *r this->dpiMultiplier = dpi / 96.f; float scale = this->dpiMultiplier / oldDpiMultiplier; - this->dpiMultiplyerChanged(oldDpiMultiplier, this->dpiMultiplier); + this->dpiMultiplierChanged(oldDpiMultiplier, this->dpiMultiplier); this->resize(static_cast(this->width() * scale), static_cast(this->height() * scale)); diff --git a/src/widgets/basewidget.hpp b/src/widgets/basewidget.hpp index dadecfa29..e542d9a46 100644 --- a/src/widgets/basewidget.hpp +++ b/src/widgets/basewidget.hpp @@ -35,7 +35,7 @@ protected: virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result) override; #endif - virtual void dpiMultiplyerChanged(float oldDpi, float newDpi) + virtual void dpiMultiplierChanged(float oldDpi, float newDpi) { } void initAsWindow(); diff --git a/src/widgets/settingsdialog.cpp b/src/widgets/settingsdialog.cpp index df106e8de..e825eeef5 100644 --- a/src/widgets/settingsdialog.cpp +++ b/src/widgets/settingsdialog.cpp @@ -67,7 +67,7 @@ SettingsDialog::SettingsDialog() this->addTabs(); - this->dpiMultiplyerChanged(this->getDpiMultiplier(), this->getDpiMultiplier()); + this->dpiMultiplierChanged(this->getDpiMultiplier(), this->getDpiMultiplier()); } void SettingsDialog::addTabs() @@ -608,7 +608,7 @@ void SettingsDialog::showDialog() instance->setFocus(); } -void SettingsDialog::dpiMultiplyerChanged(float oldDpi, float newDpi) +void SettingsDialog::dpiMultiplierChanged(float oldDpi, float newDpi) { QFile file(":/qss/settings.qss"); file.open(QFile::ReadOnly); diff --git a/src/widgets/settingsdialog.hpp b/src/widgets/settingsdialog.hpp index 2c5b777c6..b06b85d66 100644 --- a/src/widgets/settingsdialog.hpp +++ b/src/widgets/settingsdialog.hpp @@ -34,7 +34,7 @@ public: static void showDialog(); protected: - virtual void dpiMultiplyerChanged(float oldDpi, float newDpi) override; + virtual void dpiMultiplierChanged(float oldDpi, float newDpi) override; private: SettingsSnapshot snapshot;