mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
Ref T592, no more dock widget float/dock to init, init explicitly and when first opened
This commit is contained in:
committed by
Mat Sutcliffe
parent
546a8a06d3
commit
097dfe0a24
@@ -518,6 +518,9 @@ namespace BlackGui
|
|||||||
QSizePolicy sizePolicy = compWidget->sizePolicy();
|
QSizePolicy sizePolicy = compWidget->sizePolicy();
|
||||||
sizePolicy.setVerticalStretch(1); // make the original widget occupying maximum space
|
sizePolicy.setVerticalStretch(1); // make the original widget occupying maximum space
|
||||||
compWidget->setSizePolicy(sizePolicy);
|
compWidget->setSizePolicy(sizePolicy);
|
||||||
|
|
||||||
|
// hide status bar if not floating T592 no longer init floating
|
||||||
|
if (!this->isFloating()) { m_statusBar.hide(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDockWidget::showContextMenu(const QPoint &pos)
|
void CDockWidget::showContextMenu(const QPoint &pos)
|
||||||
|
|||||||
@@ -565,15 +565,16 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
// float
|
// float
|
||||||
QPoint offset(i * 25, i * 20);
|
QPoint offset(i * 25, i * 20);
|
||||||
after->setVisible(false);
|
// after->setVisible(false);
|
||||||
after->setFloating(true);
|
// after->setFloating(true);
|
||||||
after->setOffsetWhenFloating(offset);
|
after->setOffsetWhenFloating(offset);
|
||||||
QSize floatingSize = this->getPreferredSizeWhenFloating(i);
|
const QSize floatingSize = this->getPreferredSizeWhenFloating(i);
|
||||||
after->setPreferredSizeWhenFloating(floatingSize);
|
after->setPreferredSizeWhenFloating(floatingSize);
|
||||||
|
after->initialFloating();
|
||||||
|
|
||||||
// dock again
|
// dock again
|
||||||
after->setFloating(false);
|
// after->setFloating(false);
|
||||||
after->setVisible(true);
|
// after->setVisible(true);
|
||||||
|
|
||||||
// reset floating flag, we want new resizing and position for first real floating
|
// reset floating flag, we want new resizing and position for first real floating
|
||||||
after->resetWasAlreadyFloating();
|
after->resetWasAlreadyFloating();
|
||||||
@@ -802,7 +803,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
// when toplevel is changed, I need a round in the event loop until
|
// when toplevel is changed, I need a round in the event loop until
|
||||||
// current tab bar widget is visible
|
// current tab bar widget is visible
|
||||||
QTimer::singleShot(250, this, &CInfoArea::emitInfoAreaStatus);
|
// QTimer::singleShot(250, this, &CInfoArea::emitInfoAreaStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInfoArea::onStyleSheetChanged()
|
void CInfoArea::onStyleSheetChanged()
|
||||||
|
|||||||
Reference in New Issue
Block a user