From 6cb900c3d563a1d8a7926f9d7d6edac51b786aa9 Mon Sep 17 00:00:00 2001 From: jzxc95 <907297917@qq.com> Date: Fri, 21 Oct 2022 18:54:32 +0800 Subject: [PATCH] fix bug 125714 --- debian/changelog | 42 +++++++++++++++++++++----- src/frontend/mainwindow.cpp | 24 +++++---------- src/frontend/mainwindow.h | 1 - src/frontend/tools/radioitembutton.cpp | 2 +- 4 files changed, 42 insertions(+), 27 deletions(-) diff --git a/debian/changelog b/debian/changelog index e5e3a056..b2a8c577 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,40 @@ -kylin-nm (3.20.1.6-ok10) v101; urgency=medium +kylin-nm (3.20.1.9) v101; urgency=medium - * BUG号: - -#145498 【设计】【控制面板】【平板】添加快捷键弹窗实现不符合设计规范 - * 需求号: - * 其他改动:无 - * 影响域:控制面板 代理 + * BUG号: + -#125714 【UKUI 3.20 走查】【网络】快捷键支持不完整 + * 需求号:无 + * 其他改动: + * 影响域:win+k快捷键 强调色适配 - -- zhaoshixu Wed, 09 Nov 2022 17:41:17 +0800 + -- zhaoshixu Fri, 21 Oct 2022 18:51:58 +0800 -kylin-nm (3.20.1.6-ok9) v101; urgency=medium +kylin-nm (3.20.1.8) v101; urgency=medium + + * BUG号: + -#144126 【设计】【网络连接】网络属性界面寻光主题下显示外观不符 + * 需求号:无 + * 其他改动: + * 影响域:主题深浅模式ui + + -- zhaoshixu Fri, 21 Oct 2022 10:55:39 +0800 + +kylin-nm (3.20.1.7) v101; urgency=medium + + * BUG号: + -#132105 【设计】网络属性界面字体最大时显示与设计预期不符 + -#140441 【rc6走查】【托盘】【网络】弹窗页tab控件未居中对齐 + -#141204 【rc6走查】【托盘】【网络】网络项间距待调整 + -#143412 【设计】【控制面板】有线、无线网络边距布局未按规范 + -#143422 【设计】【控制面板】移动热点通知弹窗调用图标错误 + -#143023 【设计】【控制面板】有线网络连接属性界面无删除此网络功能 + * 需求号:无 + * 其他改动: + 任务-#112767 应用代理功能开发 + * 影响域:属性页面UI 消息通知 控制面板应用代理 + + -- zhaoshixu Thu, 13 Oct 2022 16:27:57 +0800 + +kylin-nm (3.20.1.6) v101; urgency=medium * BUG号: - #145719 【VPN】在任务栏虚拟连接界面点击连接VPN,任务栏网络图标消失后重新显示,概率性不恢复显示 diff --git a/src/frontend/mainwindow.cpp b/src/frontend/mainwindow.cpp index b228d002..8d760f4d 100644 --- a/src/frontend/mainwindow.cpp +++ b/src/frontend/mainwindow.cpp @@ -139,7 +139,6 @@ void MainWindow::firstlyStart() initDbusConnnect(); initWindowTheme(); initTrayIcon(); - installEventFilter(this); m_secondaryStartTimer = new QTimer(this); connect(m_secondaryStartTimer, &QTimer::timeout, this, [ = ]() { m_secondaryStartTimer->stop(); @@ -362,6 +361,13 @@ void MainWindow::initDbusConnnect() QString("/"), QString("com.kylin.statusmanager.interface"), QString("mode_change_signal"), this, SLOT(onTabletModeChanged(bool))); + + connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, this,[&](WId activeWindowId){ + if (activeWindowId != this->winId()) { + hideMainwindow(); + } + }); + } /** @@ -706,22 +712,6 @@ void MainWindow::keyPressEvent(QKeyEvent *event) return QWidget::keyPressEvent(event); } -/** - * @brief MainWindow::eventFilter 事件过滤器 - * @param watched - * @param event - * @return - */ -bool MainWindow::eventFilter(QObject *watched, QEvent *event) -{ - if (event->type() == QEvent::ActivationChange) { - if(QApplication::activeWindow() != this) { - hideMainwindow(); - } - } - return QMainWindow::eventFilter(watched,event); -} - /** * @brief MainWindow::getWirelessList 获取wifi列表,供dbus调用 * @param map diff --git a/src/frontend/mainwindow.h b/src/frontend/mainwindow.h index c5169274..fe5d5691 100644 --- a/src/frontend/mainwindow.h +++ b/src/frontend/mainwindow.h @@ -140,7 +140,6 @@ public Q_SLOTS: protected: void keyPressEvent(QKeyEvent *event); - bool eventFilter(QObject *watched, QEvent *event) override; void paintEvent(QPaintEvent *event); private: diff --git a/src/frontend/tools/radioitembutton.cpp b/src/frontend/tools/radioitembutton.cpp index 8603d1ab..e4b704ff 100644 --- a/src/frontend/tools/radioitembutton.cpp +++ b/src/frontend/tools/radioitembutton.cpp @@ -53,7 +53,7 @@ RadioItemButton::RadioItemButton(QWidget *parent) : QPushButton(parent) const QByteArray id(THEME_SCHAME); if (QGSettings::isSchemaInstalled(id)) { - m_styleGSettings = new QGSettings(id); + m_styleGSettings = new QGSettings(id, this); connect(m_styleGSettings, &QGSettings::changed, this, [=](QString key){ if ("themeColor" == key) { onPaletteChanged();