fix: 调整双标题栏问题
This commit is contained in:
parent
169f2ecf8f
commit
b6e3037b9c
|
@ -102,7 +102,6 @@ void viewControl::showView(bool isStart)
|
|||
//显示在屏幕中央
|
||||
void viewControl::showInCenter(QWidget *w)
|
||||
{
|
||||
::kabase::WindowManage::removeHeader(m_horscreen);
|
||||
//计算将窗口移动到屏幕中间,并show出来
|
||||
if (!w->isVisible()) {
|
||||
// wayland下居中显示
|
||||
|
@ -119,7 +118,9 @@ void viewControl::showInCenter(QWidget *w)
|
|||
}
|
||||
}
|
||||
w->hide();
|
||||
::kabase::WindowManage::removeHeader(w);
|
||||
w->show();
|
||||
::kabase::WindowManage::removeHeader(w);
|
||||
w->activateWindow();
|
||||
w->raise();
|
||||
ViewVar::widgetIsShow = true;
|
||||
|
|
1
main.cpp
1
main.cpp
|
@ -17,6 +17,7 @@ void controlView(kdk::kabase::QtSingleApplication &a, const QStringList &args, b
|
|||
QObject::connect(&a, &kdk::kabase::QtSingleApplication::messageReceived, viewControl::getInstance(),
|
||||
&viewControl::toShowView);
|
||||
//激活窗口
|
||||
::kabase::WindowManage::removeHeader(viewControl::getInstance()->activeWindow());
|
||||
a.setActivationWindow(viewControl::getInstance()->activeWindow());
|
||||
}
|
||||
int main(int argc, char *argv[])
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "qtsingleapplication.h"
|
||||
#include "qtlocalpeer.h"
|
||||
#include <QWidget>
|
||||
#include "windowmanage.hpp"
|
||||
|
||||
|
||||
/*!
|
||||
|
@ -326,6 +327,8 @@ void QtSingleApplication::activateWindow()
|
|||
actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
|
||||
if(!actWin->isActiveWindow())
|
||||
actWin->hide();
|
||||
|
||||
::kabase::WindowManage::removeHeader(actWin);
|
||||
actWin->show(); // 解决了vnc远程时应用窗口不显示的问题
|
||||
actWin->raise();
|
||||
actWin->activateWindow();
|
||||
|
|
|
@ -510,7 +510,6 @@ void horscreen::createTrayIcon(QString code)
|
|||
|
||||
void horscreen::handleIconClickedSub()
|
||||
{
|
||||
::kabase::WindowManage::removeHeader(this);
|
||||
if (this->m_title->g_menu->m_aboutWindow) {
|
||||
this->m_title->g_menu->m_aboutWindow->close();
|
||||
}
|
||||
|
@ -529,7 +528,9 @@ void horscreen::handleIconClickedSub()
|
|||
}
|
||||
}
|
||||
this->hide();
|
||||
::kabase::WindowManage::removeHeader(this);
|
||||
this->show();
|
||||
::kabase::WindowManage::removeHeader(this);
|
||||
this->activateWindow();
|
||||
this->raise();
|
||||
ViewVar::widgetIsShow = true;
|
||||
|
@ -604,6 +605,7 @@ void horscreen::showLocateWidget()
|
|||
void horscreen::showAllowLocationWidget()
|
||||
{
|
||||
m_AllowLocationwidget->move(this->geometry().center() - m_AllowLocationwidget->rect().center());
|
||||
::kabase::WindowManage::removeHeader(m_AllowLocationwidget);
|
||||
m_AllowLocationwidget->show();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue