forked from qt-creator/qt-creator
ProjectExplorer: Replace project mode main window splitter by dockwidget
The main window of the project mode is already a QMainWindow, using a dock window also for the empty space on the right makes it consistent with the separation of the project tree on the left. Change-Id: Ida42f267b87eb45cd1692ebcc16ded2ee6c1e523 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -653,6 +653,19 @@ ProjectWindow::ProjectWindow()
|
||||
{
|
||||
setBackgroundRole(QPalette::Base);
|
||||
|
||||
// The empty space on the right side of the project mode window.
|
||||
auto rightSpace = new QWidget;
|
||||
rightSpace->setAutoFillBackground(true);
|
||||
rightSpace->setObjectName("ProjectModeRightSpace"); // Needed for dock widget state saving
|
||||
rightSpace->setWindowTitle("dummy");
|
||||
|
||||
auto rightSpaceLayout = new QVBoxLayout(rightSpace);
|
||||
rightSpaceLayout->setContentsMargins(0, 0, 0, 0);
|
||||
rightSpaceLayout->addWidget(new StyledBar(rightSpace)); // The black blob on top
|
||||
rightSpaceLayout->addStretch();
|
||||
|
||||
addDockWidget(Qt::RightDockWidgetArea, addDockForWidget(rightSpace, true));
|
||||
|
||||
// Request custom context menu but do not provide any to avoid
|
||||
// the creation of the dock window selection menu.
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
|
||||
Reference in New Issue
Block a user