mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 02:06:08 +08:00
Improved kill button handling, now it can be set even if frame is not yet initialized
* default is disabled * only pilot client needs to enable it
This commit is contained in:
committed by
Mathew Sutcliffe
parent
0851b8c994
commit
83383f438c
@@ -134,9 +134,6 @@ namespace BlackGui
|
|||||||
// vPilot
|
// vPilot
|
||||||
this->initVPilotLoading();
|
this->initVPilotLoading();
|
||||||
|
|
||||||
// overlay
|
|
||||||
this->showKillButton(false);
|
|
||||||
|
|
||||||
// user changes
|
// user changes
|
||||||
m_swiftDbUser.setNotifySlot(&CDbMappingComponent::ps_userChanged);
|
m_swiftDbUser.setNotifySlot(&CDbMappingComponent::ps_userChanged);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
void COverlayMessagesFrame::showKillButton(bool killButton)
|
void COverlayMessagesFrame::showKillButton(bool killButton)
|
||||||
{
|
{
|
||||||
|
m_showKillButton = killButton;
|
||||||
if (m_overlayMessages)
|
if (m_overlayMessages)
|
||||||
{
|
{
|
||||||
m_overlayMessages->showKillButton(killButton);
|
m_overlayMessages->showKillButton(killButton);
|
||||||
@@ -123,6 +124,7 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
this->m_overlayMessages = new COverlayMessages(inner.width(), inner.height(), this);
|
this->m_overlayMessages = new COverlayMessages(inner.width(), inner.height(), this);
|
||||||
this->m_overlayMessages->addShadow();
|
this->m_overlayMessages->addShadow();
|
||||||
|
this->m_overlayMessages->showKillButton(m_showKillButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_ASSERT(this->m_overlayMessages);
|
Q_ASSERT(this->m_overlayMessages);
|
||||||
|
|||||||
@@ -100,8 +100,9 @@ namespace BlackGui
|
|||||||
//! Init the inner frame (if not yet initialized)
|
//! Init the inner frame (if not yet initialized)
|
||||||
void initInnerFrame();
|
void initInnerFrame();
|
||||||
|
|
||||||
double m_widthFactor = 0.7; //!< inner frame x factor
|
bool m_showKillButton = false; //!< show kill button
|
||||||
double m_heightFactor = 0.6; //!< inner frame x factor
|
double m_widthFactor = 0.7; //!< inner frame x factor
|
||||||
|
double m_heightFactor = 0.6; //!< inner frame x factor
|
||||||
};
|
};
|
||||||
} // ns
|
} // ns
|
||||||
|
|
||||||
|
|||||||
@@ -145,6 +145,9 @@ void SwiftGuiStd::init()
|
|||||||
ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(sGui->swiftVersionString());
|
ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(sGui->swiftVersionString());
|
||||||
ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(CBuildConfig::compiledWithInfo());
|
ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(CBuildConfig::compiledWithInfo());
|
||||||
|
|
||||||
|
// Show kill button
|
||||||
|
ui->fr_CentralFrameInside->showKillButton(true);
|
||||||
|
|
||||||
// do this as last statement, so it can be used as flag
|
// do this as last statement, so it can be used as flag
|
||||||
// whether init has been completed
|
// whether init has been completed
|
||||||
this->setVisible(true);
|
this->setVisible(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user