Enable fractional scaling for Windows, fixes #2571
This commit is contained in:
parent
b6c08ef38e
commit
598066bfe4
1 changed files with 14 additions and 1 deletions
15
main.cpp
15
main.cpp
|
|
@ -216,7 +216,20 @@ int main(int argc, char* argv[])
|
||||||
if(ret_flags & RET_FLAG_START_GUI)
|
if(ret_flags & RET_FLAG_START_GUI)
|
||||||
{
|
{
|
||||||
LOG_TRACE("[main] initializing GUI");
|
LOG_TRACE("[main] initializing GUI");
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
||||||
|
/*-----------------------------------------------------*\
|
||||||
|
| Enable high DPI scaling support |
|
||||||
|
\*-----------------------------------------------------*/
|
||||||
|
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||||
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
||||||
|
|
||||||
|
/*-----------------------------------------------------*\
|
||||||
|
| Enable high DPI fractional scaling support on Windows |
|
||||||
|
\*-----------------------------------------------------*/
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) && defined(Q_OS_WIN)
|
||||||
|
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
|
#endif
|
||||||
|
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
QGuiApplication::setDesktopFileName("org.openrgb.OpenRGB");
|
QGuiApplication::setDesktopFileName("org.openrgb.OpenRGB");
|
||||||
LOG_TRACE("[main] QApplication created");
|
LOG_TRACE("[main] QApplication created");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue