Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add toolbar menu
  • Loading branch information
nyalldawson committed Jul 11, 2017
1 parent 9b9126c commit 76beef4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -211,6 +211,17 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
connect( mHorizontalRuler, &QgsLayoutRuler::cursorPosChanged, this, &QgsLayoutDesignerDialog::updateStatusCursorPos );
connect( mVerticalRuler, &QgsLayoutRuler::cursorPosChanged, this, &QgsLayoutDesignerDialog::updateStatusCursorPos );

// Panel and toolbar submenus
QMenu *toolbarMenu = new QMenu( tr( "&Toolbars" ), this );
toolbarMenu->setObjectName( QStringLiteral( "mToolbarMenu" ) );
mMenuView->addSeparator();
mMenuView->addMenu( toolbarMenu );

// toolBar already exists, add other widgets as they are created
toolbarMenu->addAction( mLayoutToolbar->toggleViewAction() );
toolbarMenu->addAction( mNavigationToolbar->toggleViewAction() );
toolbarMenu->addAction( mToolsToolbar->toggleViewAction() );

restoreWindowState();
}

Expand Down
4 changes: 2 additions & 2 deletions src/ui/layout/qgslayoutdesignerbase.ui
Expand Up @@ -54,7 +54,7 @@
<widget class="QStatusBar" name="mStatusBar"/>
<widget class="QToolBar" name="mLayoutToolbar">
<property name="windowTitle">
<string>Composer</string>
<string>Layout</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
Expand Down Expand Up @@ -115,7 +115,7 @@
</widget>
<widget class="QToolBar" name="mNavigationToolbar">
<property name="windowTitle">
<string>toolBar</string>
<string>Navigation</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
Expand Down

0 comments on commit 76beef4

Please sign in to comment.