diff --git a/src/frontend/list-items/wlanlistitem.cpp b/src/frontend/list-items/wlanlistitem.cpp index 0af437df..829fc2cb 100644 --- a/src/frontend/list-items/wlanlistitem.cpp +++ b/src/frontend/list-items/wlanlistitem.cpp @@ -283,6 +283,7 @@ void WlanListItem::initWlanUI() m_pwdFrameLyt->addWidget(m_pwdLineEdit); m_connectButton = new QPushButton(m_pwdFrame); + m_connectButton->setProperty("needTranslucent", true); m_connectButton->setFixedSize(CONNECT_BUTTON_WIDTH, PWD_AREA_HEIGHT); m_connectButton->setText(tr("Connect")); m_connectButton->setEnabled(false); @@ -665,4 +666,3 @@ void WlanListItem::setConnectButtonState() m_connectButton->setPalette(btnPal); } } - diff --git a/src/frontend/mainwindow.cpp b/src/frontend/mainwindow.cpp index 8d760f4d..7c98d89a 100644 --- a/src/frontend/mainwindow.cpp +++ b/src/frontend/mainwindow.cpp @@ -363,7 +363,7 @@ void MainWindow::initDbusConnnect() QString("mode_change_signal"), this, SLOT(onTabletModeChanged(bool))); connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, this,[&](WId activeWindowId){ - if (activeWindowId != this->winId()) { + if (activeWindowId != this->winId() && activeWindowId != 0) { hideMainwindow(); } }); diff --git a/src/frontend/tab-pages/lanpage.cpp b/src/frontend/tab-pages/lanpage.cpp index 19b0845c..3c9bca01 100644 --- a/src/frontend/tab-pages/lanpage.cpp +++ b/src/frontend/tab-pages/lanpage.cpp @@ -729,6 +729,7 @@ void LanPage::initUI() m_activatedLanListWidget->setFixedHeight(ITEM_HEIGHT); //active区域固定高度,只显示一个条目 m_activatedLanListWidget->setFixedWidth(MIN_WIDTH); m_activatedLanListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_activatedLanListWidget->setProperty("needTranslucent", true); m_activatedNetLayout->addWidget(m_activatedLanListWidget); m_inactivatedNetLabel->setText(tr("Inactivated LAN")); @@ -740,6 +741,8 @@ void LanPage::initUI() m_inactivatedLanListWidget->verticalScrollBar()->setProperty("drawScrollBarGroove",false); //去除滚动条的外侧黑框 m_inactivatedLanListWidget->verticalScrollBar()->setSingleStep(SCROLL_STEP); m_inactivatedLanListWidget->verticalScrollBar()->setContextMenuPolicy(Qt::NoContextMenu); + m_inactivatedLanListWidget->verticalScrollBar()->setProperty("needTranslucent", true); + m_inactivatedLanListWidget->setProperty("needTranslucent", true); m_inactivatedAreaLayout->addWidget(m_inactivatedLanListWidget); QPalette pal = m_activatedLanListWidget->palette(); diff --git a/src/frontend/tab-pages/tabpage.cpp b/src/frontend/tab-pages/tabpage.cpp index 3e4502f9..b93bebed 100644 --- a/src/frontend/tab-pages/tabpage.cpp +++ b/src/frontend/tab-pages/tabpage.cpp @@ -50,6 +50,7 @@ void TabPage::initUI() m_titleLayout->setContentsMargins(TITLE_LAYOUT_MARGINS); m_titleLabel = new QLabel(m_titleFrame); m_netSwitch = new KSwitchButton(m_titleFrame); + m_netSwitch->setTranslucent(true); m_titleLayout->addWidget(m_titleLabel); m_titleLayout->addStretch(); m_titleLayout->addWidget(m_netSwitch); diff --git a/src/frontend/tab-pages/wlanpage.cpp b/src/frontend/tab-pages/wlanpage.cpp index 55027ded..93089e6f 100644 --- a/src/frontend/tab-pages/wlanpage.cpp +++ b/src/frontend/tab-pages/wlanpage.cpp @@ -114,6 +114,7 @@ void WlanPage::initWlanUI() m_activatedNetListWidget->setFixedHeight(NORMAL_HEIGHT); m_activatedNetListWidget->setFixedWidth(MIN_WIDTH); m_activatedNetListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_activatedNetListWidget->setProperty("needTranslucent", true); m_activatedNetLayout->addWidget(m_activatedNetListWidget); m_inactivatedNetLabel->setText(tr("Other WLAN")); @@ -126,6 +127,8 @@ void WlanPage::initWlanUI() m_inactivatedNetListWidget->verticalScrollBar()->setProperty("drawScrollBarGroove",false); //去除滚动条的外侧黑框 m_inactivatedNetListWidget->verticalScrollBar()->setSingleStep(SCROLL_STEP); m_inactivatedNetListWidget->verticalScrollBar()->setContextMenuPolicy(Qt::NoContextMenu); + m_inactivatedNetListWidget->verticalScrollBar()->setProperty("needTranslucent", true); + m_inactivatedNetListWidget->setProperty("needTranslucent", true); addWlanMoreItem(); m_inactivatedAreaLayout->addWidget(m_inactivatedNetListWidget);