openKylin解决VPN托盘区详细信息页面显示问题,去掉窗口标题栏
This commit is contained in:
parent
c1e685fc9e
commit
b58140183c
|
@ -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
|
||||
// << "." <<Q_FUNC_INFO << __LINE__;
|
||||
|
||||
// bool isActivated = false;
|
||||
// if (Activated == m_vpnConnectItem.m_connectState) {
|
||||
// isActivated = true;
|
||||
// }
|
||||
|
||||
// netDetail = new NetDetail(m_deviceName, m_vpnConnectItem.m_connectName,
|
||||
// m_vpnConnectItem.m_connectUuid, isActivated,false, false);
|
||||
|
||||
// connect(netDetail, &NetDetail::destroyed, [&](){
|
||||
// if (netDetail != nullptr) {
|
||||
// netDetail = nullptr;
|
||||
// }
|
||||
// });
|
||||
|
||||
// netDetail->show();
|
||||
// Q_EMIT this->detailShow(true);
|
||||
|
||||
//openKylin 优先做出infoButton功能,等自研详情页面做好后合入
|
||||
QString cmd = "nm-connection-editor";
|
||||
QProcess process(this);
|
||||
process.startDetached(cmd);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <QDebug>
|
||||
#include <QScrollBar>
|
||||
#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界面时会刷新属性,需要重新设置无图标属性
|
||||
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();
|
||||
|
|
|
@ -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();;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include "mainwindow.h"
|
||||
#include "dbusadaptor.h"
|
||||
#include "vpndbusadaptor.h"
|
||||
#include <QTranslator>
|
||||
#include <QLocale>
|
||||
#include "qt-single-application.h"
|
||||
|
@ -31,6 +30,7 @@
|
|||
#endif
|
||||
|
||||
#include "vpnobject.h"
|
||||
#include "vpndbusadaptor.h"
|
||||
|
||||
#define LOG_IDENT "ukui_kylin_nm"
|
||||
|
||||
|
|
Loading…
Reference in New Issue