Ref T452, fixed "invisible main area" after re-docking plus style

This commit is contained in:
Klaus Basan
2018-12-05 19:16:52 +01:00
parent 280c9a4e56
commit 669a1ea995
2 changed files with 11 additions and 7 deletions

View File

@@ -85,9 +85,9 @@ namespace BlackGui
bool hasDockedWidgets = this->countDockedWidgetInfoAreas() > 0; bool hasDockedWidgets = this->countDockedWidgetInfoAreas() > 0;
if (hasDockedWidgets) if (hasDockedWidgets)
{ {
menu->addAction(CIcons::dockTop16(), "Dock all", this, SLOT(dockAllWidgets())); menu->addAction(CIcons::dockTop16(), "Dock all", this, &CInfoArea::dockAllWidgets);
menu->addAction(CIcons::floatAll16(), "Float all", this, SLOT(floatAllWidgets())); menu->addAction(CIcons::floatAll16(), "Float all", this, &CInfoArea::floatAllWidgets);
menu->addAction(CIcons::floatOne16(), QString("Dock / float '%1'").arg(this->windowTitle()), this, SLOT(toggleFloatingWholeInfoArea())); menu->addAction(CIcons::floatOne16(), QString("Dock / float '%1'").arg(this->windowTitle()), this, &CInfoArea::toggleFloatingWholeInfoArea);
QAction *lockTabBarMenuAction = new QAction(menu); QAction *lockTabBarMenuAction = new QAction(menu);
lockTabBarMenuAction->setObjectName(this->objectName().append("LockTabBar")); lockTabBarMenuAction->setObjectName(this->objectName().append("LockTabBar"));
lockTabBarMenuAction->setIconText("Lock tab bar"); lockTabBarMenuAction->setIconText("Lock tab bar");
@@ -511,6 +511,7 @@ namespace BlackGui
{ {
QPoint p = CGuiUtility::mainWidgetPosition(); QPoint p = CGuiUtility::mainWidgetPosition();
this->setWindowFlags(Qt::Dialog); this->setWindowFlags(Qt::Dialog);
this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
this->move(p.rx() + 20, p.ry() + 20); this->move(p.rx() + 20, p.ry() + 20);
this->show(); // not working without show this->show(); // not working without show
} }
@@ -525,9 +526,12 @@ namespace BlackGui
// RW: The line below is commented to prevent making this widget visible as a top window // RW: The line below is commented to prevent making this widget visible as a top window
// in case it is constructed without parent or anchestor widget. Contrary to the comment, // in case it is constructed without parent or anchestor widget. Contrary to the comment,
// it does not seem to be necessary. // it does not seem to be necessary https://dev.vatsim-germany.org/issues/738
// https://dev.vatsim-germany.org/issues/738 // KB 2018-12 with T447 T452 re-eanled the line again, but wit parent condition
// this->setVisible(true); // after redocking this is required if (this->parentWidget()) // this line
{
this->setVisible(true); // after redocking this is required
}
} }
emit changedWholeInfoAreaFloating(floating); emit changedWholeInfoAreaFloating(floating);

View File

@@ -49,7 +49,7 @@ namespace BlackGui
public: public:
//! Destructor //! Destructor
virtual ~CInfoArea(); virtual ~CInfoArea() override;
//! Add items to context menu //! Add items to context menu
void addToContextMenu(QMenu *menu) const; void addToContextMenu(QMenu *menu) const;