disabled non client dpi scaling until issue is fixed
This commit is contained in:
+2
-2
@@ -31,8 +31,8 @@ public:
|
|||||||
EnableNonClientDpiScaling enableNonClientDpiScaling =
|
EnableNonClientDpiScaling enableNonClientDpiScaling =
|
||||||
(EnableNonClientDpiScaling)user32.resolve("EnableNonClientDpiScaling");
|
(EnableNonClientDpiScaling)user32.resolve("EnableNonClientDpiScaling");
|
||||||
|
|
||||||
if (enableNonClientDpiScaling)
|
// if (enableNonClientDpiScaling)
|
||||||
enableNonClientDpiScaling(msg->hwnd);
|
// enableNonClientDpiScaling(msg->hwnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ AccountPopupWidget::AccountPopupWidget(std::shared_ptr<Channel> channel)
|
|||||||
util::twitch::getUserID(userNickname, this,
|
util::twitch::getUserID(userNickname, this,
|
||||||
[=](const QString &id) { currentTwitchUser->setUserId(id); });
|
[=](const QString &id) { currentTwitchUser->setUserId(id); });
|
||||||
|
|
||||||
this->dpiMultiplyerChanged(this->getDpiMultiplier(), this->getDpiMultiplier());
|
this->dpiMultiplierChanged(this->getDpiMultiplier(), this->getDpiMultiplier());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountPopupWidget::setName(const QString &name)
|
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: <font-size>px; }")
|
this->setStyleSheet(QString("* { font-size: <font-size>px; }")
|
||||||
.replace("<font-size>", QString::number((int)(12 * newDpi))));
|
.replace("<font-size>", QString::number((int)(12 * newDpi))));
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public:
|
|||||||
void updatePermissions();
|
void updatePermissions();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void dpiMultiplyerChanged(float oldDpi, float newDpi) override;
|
virtual void dpiMultiplierChanged(float oldDpi, float newDpi) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AccountPopup *_ui;
|
Ui::AccountPopup *_ui;
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
#include "colorscheme.hpp"
|
#include "colorscheme.hpp"
|
||||||
#include "settingsmanager.hpp"
|
#include "settingsmanager.hpp"
|
||||||
|
|
||||||
//#include <QApplication>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
//#include <QDesktopWidget>
|
#include <QLayout>
|
||||||
//#include <QScreen>
|
#include <QtGlobal>
|
||||||
#include <boost/signals2.hpp>
|
#include <boost/signals2.hpp>
|
||||||
#include "util/nativeeventhelper.hpp"
|
#include "util/nativeeventhelper.hpp"
|
||||||
|
|
||||||
@@ -91,7 +90,7 @@ bool BaseWidget::nativeEvent(const QByteArray &eventType, void *message, long *r
|
|||||||
this->dpiMultiplier = dpi / 96.f;
|
this->dpiMultiplier = dpi / 96.f;
|
||||||
float scale = this->dpiMultiplier / oldDpiMultiplier;
|
float scale = this->dpiMultiplier / oldDpiMultiplier;
|
||||||
|
|
||||||
this->dpiMultiplyerChanged(oldDpiMultiplier, this->dpiMultiplier);
|
this->dpiMultiplierChanged(oldDpiMultiplier, this->dpiMultiplier);
|
||||||
|
|
||||||
this->resize(static_cast<int>(this->width() * scale),
|
this->resize(static_cast<int>(this->width() * scale),
|
||||||
static_cast<int>(this->height() * scale));
|
static_cast<int>(this->height() * scale));
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ protected:
|
|||||||
virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
|
virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void dpiMultiplyerChanged(float oldDpi, float newDpi)
|
virtual void dpiMultiplierChanged(float oldDpi, float newDpi)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
void initAsWindow();
|
void initAsWindow();
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ SettingsDialog::SettingsDialog()
|
|||||||
|
|
||||||
this->addTabs();
|
this->addTabs();
|
||||||
|
|
||||||
this->dpiMultiplyerChanged(this->getDpiMultiplier(), this->getDpiMultiplier());
|
this->dpiMultiplierChanged(this->getDpiMultiplier(), this->getDpiMultiplier());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::addTabs()
|
void SettingsDialog::addTabs()
|
||||||
@@ -608,7 +608,7 @@ void SettingsDialog::showDialog()
|
|||||||
instance->setFocus();
|
instance->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::dpiMultiplyerChanged(float oldDpi, float newDpi)
|
void SettingsDialog::dpiMultiplierChanged(float oldDpi, float newDpi)
|
||||||
{
|
{
|
||||||
QFile file(":/qss/settings.qss");
|
QFile file(":/qss/settings.qss");
|
||||||
file.open(QFile::ReadOnly);
|
file.open(QFile::ReadOnly);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public:
|
|||||||
static void showDialog();
|
static void showDialog();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void dpiMultiplyerChanged(float oldDpi, float newDpi) override;
|
virtual void dpiMultiplierChanged(float oldDpi, float newDpi) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SettingsSnapshot snapshot;
|
SettingsSnapshot snapshot;
|
||||||
|
|||||||
Reference in New Issue
Block a user