mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +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();
|
||||
sizePolicy.setVerticalStretch(1); // make the original widget occupying maximum space
|
||||
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)
|
||||
|
||||
@@ -565,15 +565,16 @@ namespace BlackGui
|
||||
{
|
||||
// float
|
||||
QPoint offset(i * 25, i * 20);
|
||||
after->setVisible(false);
|
||||
after->setFloating(true);
|
||||
// after->setVisible(false);
|
||||
// after->setFloating(true);
|
||||
after->setOffsetWhenFloating(offset);
|
||||
QSize floatingSize = this->getPreferredSizeWhenFloating(i);
|
||||
const QSize floatingSize = this->getPreferredSizeWhenFloating(i);
|
||||
after->setPreferredSizeWhenFloating(floatingSize);
|
||||
after->initialFloating();
|
||||
|
||||
// dock again
|
||||
after->setFloating(false);
|
||||
after->setVisible(true);
|
||||
// after->setFloating(false);
|
||||
// after->setVisible(true);
|
||||
|
||||
// reset floating flag, we want new resizing and position for first real floating
|
||||
after->resetWasAlreadyFloating();
|
||||
@@ -802,7 +803,7 @@ namespace BlackGui
|
||||
|
||||
// when toplevel is changed, I need a round in the event loop until
|
||||
// current tab bar widget is visible
|
||||
QTimer::singleShot(250, this, &CInfoArea::emitInfoAreaStatus);
|
||||
// QTimer::singleShot(250, this, &CInfoArea::emitInfoAreaStatus);
|
||||
}
|
||||
|
||||
void CInfoArea::onStyleSheetChanged()
|
||||
|
||||
Reference in New Issue
Block a user