commit
1a2ba6b2d2
|
@ -80,8 +80,13 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
initUkuiLog4qt("kylin-vpn");
|
initUkuiLog4qt("kylin-vpn");
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
|
#endif
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
|
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
|
#endif
|
||||||
|
|
||||||
QString id = QString("kylin-vpn"+ QLatin1String(getenv("DISPLAY")));
|
QString id = QString("kylin-vpn"+ QLatin1String(getenv("DISPLAY")));
|
||||||
QtSingleApplication a(id, argc, argv);
|
QtSingleApplication a(id, argc, argv);
|
||||||
|
|
|
@ -908,6 +908,7 @@ void MainWindow::showCreateWiredConnectWidget(const QString devName)
|
||||||
});
|
});
|
||||||
m_createPagePtrMap.insert(devName, netDetail);
|
m_createPagePtrMap.insert(devName, netDetail);
|
||||||
netDetail->show();
|
netDetail->show();
|
||||||
|
KWindowSystem::raiseWindow(netDetail->winId());
|
||||||
netDetail->centerToScreen();
|
netDetail->centerToScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1277,6 +1277,7 @@ void LanPage::showDetailPage(QString devName, QString uuid)
|
||||||
NetDetail *netDetail = new NetDetail(devName, p_item->m_connectName, uuid, isActive, false, false);
|
NetDetail *netDetail = new NetDetail(devName, p_item->m_connectName, uuid, isActive, false, false);
|
||||||
m_lanPagePtrMap.insert(p_item->m_connectPath, netDetail);
|
m_lanPagePtrMap.insert(p_item->m_connectPath, netDetail);
|
||||||
netDetail->show();
|
netDetail->show();
|
||||||
|
KWindowSystem::raiseWindow(netDetail->winId());
|
||||||
netDetail->centerToScreen();
|
netDetail->centerToScreen();
|
||||||
|
|
||||||
connect(netDetail, &NetDetail::detailPageClose, [&](QString deviceName, QString lanName, QString lanUuid){
|
connect(netDetail, &NetDetail::detailPageClose, [&](QString deviceName, QString lanName, QString lanUuid){
|
||||||
|
|
|
@ -82,8 +82,13 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
initUkuiLog4qt("kylin-nm");
|
initUkuiLog4qt("kylin-nm");
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
|
#endif
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
|
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
|
#endif
|
||||||
|
|
||||||
// QApplication a(argc, argv);
|
// QApplication a(argc, argv);
|
||||||
QString id = QString("kylin-nm"+ QLatin1String(getenv("DISPLAY")));
|
QString id = QString("kylin-nm"+ QLatin1String(getenv("DISPLAY")));
|
||||||
|
|
Loading…
Reference in New Issue