Ref T592, no more dock widget float/dock to init, init explicitly and when first opened

This commit is contained in:
Klaus Basan
2019-04-05 03:00:50 +02:00
committed by Mat Sutcliffe
parent 546a8a06d3
commit 097dfe0a24
2 changed files with 10 additions and 6 deletions

View File

@@ -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)

View File

@@ -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()