Skip to content

Commit

Permalink
Center menu titles, followup 09c2444
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jul 24, 2015
1 parent c93fdf9 commit 74da254
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10560,15 +10560,21 @@ QMenu* QgisApp::createPopupMenu()

qSort( panels.begin(), panels.end(), cmpByText_ );
QWidgetAction* panelstitle = new QWidgetAction( menu );
panelstitle->setDefaultWidget( new QLabel( QString( "<b>%1</b>" ).arg( tr( "Panels" ) ) ) );
QLabel* plabel = new QLabel( QString( "<b>%1</b>" ).arg( tr( "Panels" ) ) );
plabel->setMargin( 3 );
plabel->setAlignment( Qt::AlignHCenter );
panelstitle->setDefaultWidget( plabel );
menu->addAction( panelstitle );
foreach ( QAction* a, panels )
{
menu->addAction( a );
}
menu->addSeparator();
QWidgetAction* toolbarstitle = new QWidgetAction( menu );
toolbarstitle->setDefaultWidget( new QLabel( QString( "<b>%1</b>" ).arg( tr( "Toolbars" ) ) ) );
QLabel* tlabel = new QLabel( QString( "<b>%1</b>" ).arg( tr( "Toolbars" ) ) );
tlabel->setMargin( 3 );
tlabel->setAlignment( Qt::AlignHCenter );
toolbarstitle->setDefaultWidget( tlabel );
menu->addAction( toolbarstitle );
qSort( toolbars.begin(), toolbars.end(), cmpByText_ );
foreach ( QAction* a, toolbars )
Expand Down

0 comments on commit 74da254

Please sign in to comment.