Skip to content

Commit 76beef4

Browse files
committedJul 11, 2017
Add toolbar menu
1 parent 9b9126c commit 76beef4

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed
 

‎src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,17 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
211211
connect( mHorizontalRuler, &QgsLayoutRuler::cursorPosChanged, this, &QgsLayoutDesignerDialog::updateStatusCursorPos );
212212
connect( mVerticalRuler, &QgsLayoutRuler::cursorPosChanged, this, &QgsLayoutDesignerDialog::updateStatusCursorPos );
213213

214+
// Panel and toolbar submenus
215+
QMenu *toolbarMenu = new QMenu( tr( "&Toolbars" ), this );
216+
toolbarMenu->setObjectName( QStringLiteral( "mToolbarMenu" ) );
217+
mMenuView->addSeparator();
218+
mMenuView->addMenu( toolbarMenu );
219+
220+
// toolBar already exists, add other widgets as they are created
221+
toolbarMenu->addAction( mLayoutToolbar->toggleViewAction() );
222+
toolbarMenu->addAction( mNavigationToolbar->toggleViewAction() );
223+
toolbarMenu->addAction( mToolsToolbar->toggleViewAction() );
224+
214225
restoreWindowState();
215226
}
216227

‎src/ui/layout/qgslayoutdesignerbase.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<widget class="QStatusBar" name="mStatusBar"/>
5555
<widget class="QToolBar" name="mLayoutToolbar">
5656
<property name="windowTitle">
57-
<string>Composer</string>
57+
<string>Layout</string>
5858
</property>
5959
<attribute name="toolBarArea">
6060
<enum>TopToolBarArea</enum>
@@ -115,7 +115,7 @@
115115
</widget>
116116
<widget class="QToolBar" name="mNavigationToolbar">
117117
<property name="windowTitle">
118-
<string>toolBar</string>
118+
<string>Navigation</string>
119119
</property>
120120
<attribute name="toolBarArea">
121121
<enum>TopToolBarArea</enum>

0 commit comments

Comments
 (0)
Please sign in to comment.