Fix: Remove resolution judgment

This commit is contained in:
Z-bin 2020-09-09 17:32:00 +08:00
parent abf83890cd
commit 2c7ad090da
1 changed files with 2 additions and 18 deletions

View File

@ -33,27 +33,11 @@
int main(int argc, char *argv[])
{
//QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
Display *disp = XOpenDisplay(NULL);
Screen *scrn = DefaultScreenOfDisplay(disp);
if (NULL == scrn) {
return 0;
}
int width = scrn->width;
if (width > 2560) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
}
if (NULL != disp) {
XCloseDisplay(disp);
}
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication a(argc, argv);
openlog(LOG_IDENT, LOG_NDELAY | LOG_NOWAIT | LOG_PID, LOG_USER);
syslog(LOG_DEBUG, "Kylin Network Manager Is Already Launched");