diff --git a/src/frontend/list-items/vpnlistitem.cpp b/src/frontend/list-items/vpnlistitem.cpp index 39de84b5..af226396 100644 --- a/src/frontend/list-items/vpnlistitem.cpp +++ b/src/frontend/list-items/vpnlistitem.cpp @@ -26,7 +26,6 @@ VpnListItem::VpnListItem(const KyConnectItem *lanConnectItem, QWidget *parent):ListItem(parent) { - m_infoButton->setVisible(false); m_connectOperation = new KyWiredConnectOperation(this); m_deviceResource = new KyNetworkDeviceResourse(this); @@ -166,37 +165,10 @@ void VpnListItem::onMenuTriggered(QAction *action) void VpnListItem::onInfoButtonClicked() { -// if (m_vpnConnectItem.m_connectUuid.isEmpty()) { -// qDebug() << LOG_FLAG << "connect is empty, so can not show detail info."; -// return; -// } - -// if(netDetail != nullptr){ -// netDetail->activateWindow(); -// return; -// } - -// qDebug()<< LOG_FLAG << "the info button of lan is clicked! uuid = " -// << m_vpnConnectItem.m_connectUuid << "; name = " << m_vpnConnectItem.m_connectName -// << "." <show(); -// Q_EMIT this->detailShow(true); - + //openKylin 优先做出infoButton功能,等自研详情页面做好后合入 + QString cmd = "nm-connection-editor"; + QProcess process(this); + process.startDetached(cmd); return; } diff --git a/src/frontend/single-pages/singlepage.cpp b/src/frontend/single-pages/singlepage.cpp index 848adfe3..741e5dab 100644 --- a/src/frontend/single-pages/singlepage.cpp +++ b/src/frontend/single-pages/singlepage.cpp @@ -92,6 +92,7 @@ void SinglePage::initWindowProperties() this->setFixedWidth(MAX_WIDTH); this->setAttribute(Qt::WA_TranslucentBackground); this->setProperty("useStyleWindowManager", false); //禁用拖动 + this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint); //绘制毛玻璃特效 QString platform = QGuiApplication::platformName(); if(!platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) diff --git a/src/frontend/single-pages/vpnpage.cpp b/src/frontend/single-pages/vpnpage.cpp index 641aff7c..dcc9769e 100644 --- a/src/frontend/single-pages/vpnpage.cpp +++ b/src/frontend/single-pages/vpnpage.cpp @@ -21,6 +21,7 @@ #include #include #include "windowmanager/windowmanager.h" +#include "ukuistylehelper/ukuistylehelper.h" VpnPage::VpnPage(QWidget *parent) : SinglePage(parent) @@ -649,11 +650,15 @@ void VpnPage::showDetailPage(QString devName, QString uuid) void VpnPage::showUI() { //2209中窗管在hide界面时会刷新属性,需要重新设置无图标属性 - const KWindowInfo info(this->winId(), NET::WMState); - if (!info.hasState(NET::SkipTaskbar) || !info.hasState(NET::SkipPager)) { - KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager); + QString platform = QGuiApplication::platformName(); + if(!platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) { + const KWindowInfo info(this->winId(), NET::WMState); + if (!info.hasState(NET::SkipTaskbar) || !info.hasState(NET::SkipPager)) { + KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager); + } } + kdk::UkuiStyleHelper::self()->removeHeader(this); resetPageHight(); showNormal(); diff --git a/src/frontend/vpnobject.cpp b/src/frontend/vpnobject.cpp index 62d33bd6..eed13f23 100644 --- a/src/frontend/vpnobject.cpp +++ b/src/frontend/vpnobject.cpp @@ -93,7 +93,7 @@ void vpnObject::deactivateVpn(const QString& connUuid) void vpnObject::onShowMainWindow() { - kdk::UkuiStyleHelper::self()->removeHeader(m_vpnPage); +// kdk::UkuiStyleHelper::self()->removeHeader(m_vpnPage); m_vpnPage->showUI();; } diff --git a/src/main.cpp b/src/main.cpp index 33c8f724..ed357610 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,7 +18,6 @@ #include "mainwindow.h" #include "dbusadaptor.h" -#include "vpndbusadaptor.h" #include #include #include "qt-single-application.h" @@ -31,6 +30,7 @@ #endif #include "vpnobject.h" +#include "vpndbusadaptor.h" #define LOG_IDENT "ukui_kylin_nm"