mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 10:45:37 +08:00
Fixed minimize/normal window states to support "normal" windows as well
This commit is contained in:
committed by
Mathew Sutcliffe
parent
4268f9c347
commit
b5d74c26e0
@@ -124,6 +124,8 @@ void SwiftGuiStd::changeEvent(QEvent *event)
|
|||||||
if (event->type() == QEvent::WindowStateChange)
|
if (event->type() == QEvent::WindowStateChange)
|
||||||
{
|
{
|
||||||
// make sure a tool window is changed to Normal window so it is show in taskbar
|
// make sure a tool window is changed to Normal window so it is show in taskbar
|
||||||
|
// here we are already in transition state, so isMinimized means will be minimize right now
|
||||||
|
// this check here is needed if minimized is called from somewhere else than ps_showMinimized
|
||||||
if (!this->isFrameless())
|
if (!this->isFrameless())
|
||||||
{
|
{
|
||||||
bool toolWindow(this->isToolWindow());
|
bool toolWindow(this->isToolWindow());
|
||||||
@@ -394,13 +396,13 @@ void SwiftGuiStd::ps_onChangedMainInfoAreaFloating(bool floating)
|
|||||||
|
|
||||||
void SwiftGuiStd::ps_showMinimized()
|
void SwiftGuiStd::ps_showMinimized()
|
||||||
{
|
{
|
||||||
if (!this->isFrameless()) { toolToNormalWindow(); }
|
if (m_windowMode == CEnableForFramelessWindow::WindowTool) { this->toolToNormalWindow(); }
|
||||||
this->showMinimized();
|
this->showMinimized();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwiftGuiStd::ps_showNormal()
|
void SwiftGuiStd::ps_showNormal()
|
||||||
{
|
{
|
||||||
if (!this->isFrameless()) { normalToToolWindow(); }
|
if (m_windowMode == CEnableForFramelessWindow::WindowTool) { this->normalToToolWindow(); }
|
||||||
this->showNormal();
|
this->showNormal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ public:
|
|||||||
//! \remarks keep the values in sync with the real tab indexes
|
//! \remarks keep the values in sync with the real tab indexes
|
||||||
enum MainPageIndex
|
enum MainPageIndex
|
||||||
{
|
{
|
||||||
MainPageInfoArea = 0,
|
MainPageInfoArea = 0,
|
||||||
MainPageLogin = 1,
|
MainPageLogin = 1,
|
||||||
MainPageInternals = 2,
|
MainPageInternals = 2,
|
||||||
MainPageInvisible = 3
|
MainPageInvisible = 3
|
||||||
};
|
};
|
||||||
@@ -113,7 +113,7 @@ private:
|
|||||||
bool m_init = false;
|
bool m_init = false;
|
||||||
BlackGui::CManagedStatusBar m_statusBar;
|
BlackGui::CManagedStatusBar m_statusBar;
|
||||||
BlackMisc::CLogSubscriber m_logSubscriber { this, &SwiftGuiStd::ps_displayStatusMessageInGui };
|
BlackMisc::CLogSubscriber m_logSubscriber { this, &SwiftGuiStd::ps_displayStatusMessageInGui };
|
||||||
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
|
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
|
||||||
|
|
||||||
// contexts
|
// contexts
|
||||||
bool m_coreAvailable = false;
|
bool m_coreAvailable = false;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void SwiftGuiStd::ps_onMenuClicked()
|
|||||||
}
|
}
|
||||||
else if (sender == this->ui->menu_WindowMinimize)
|
else if (sender == this->ui->menu_WindowMinimize)
|
||||||
{
|
{
|
||||||
this->showMinimized();
|
this->ps_showMinimized();
|
||||||
}
|
}
|
||||||
else if (sender == this->ui->menu_WindowToggleOnTop)
|
else if (sender == this->ui->menu_WindowToggleOnTop)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user