Fix: Remove resolution judgment
This commit is contained in:
parent
abf83890cd
commit
2c7ad090da
20
src/main.cpp
20
src/main.cpp
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue