forked from qt-creator/qt-creator
Use sidebar buttons for hiding/showing dock areas
So far, if a mode includes navigation widget placeholders, these are used for the sidebar toggle buttons, otherwise the buttons are disabled. Now, if a mode does not include navigation widget placeholders, but the mode has a FancyMainWindow attached, use the buttons to hide or show the corresponding dock widget area (left or right). Since QMainWindow does not really support "hiding a dock widget area", the FancyMainWindow needs to track that state manually, by tracking the dock widgets that were visible before "hiding the dock widget area". Also, if a dock widget is dragged into a "hidden" area, or a widget is made visible or "unfloated" into that area, show the other widgets in the area again as well, "unhiding" the area. Since the mode widgets that have a mainwindow somewhere usually wrap that into a splitter for the output panes, and the Design mode is actually a stack widget, IMode needs another method that returns the appropriate FancyMainWindow if available. The patch implements this for Widget Designer. Change-Id: I03531f4d5130c846ff5d65831b1c9be210e1c561 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -1343,8 +1343,7 @@ NavigationWidget *ICorePrivate::navigationWidget(Side side) const
|
||||
|
||||
void ICorePrivate::setSidebarVisible(bool visible, Side side)
|
||||
{
|
||||
if (NavigationWidgetPlaceHolder::current(side))
|
||||
navigationWidget(side)->setShown(visible);
|
||||
navigationWidget(side)->setShown(visible);
|
||||
}
|
||||
|
||||
ICorePrivate::~ICorePrivate()
|
||||
|
||||
Reference in New Issue
Block a user