Skip to content

Commit

Permalink
[needs-docs] Remove " Panel" suffixes from panel titles
Browse files Browse the repository at this point in the history
This extra text adds a lot of visual clutter to the interface,
and makes tabbed dock's tab bars take up a lot of room.

Instead only show the "panel" suffix in the menus.
  • Loading branch information
nyalldawson committed Feb 23, 2018
1 parent 18ab200 commit 5f66494
Show file tree
Hide file tree
Showing 12 changed files with 182 additions and 54 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/ui/ProcessingToolbox.ui
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Processing Toolbox Panel</string>
<string>Processing Toolbox</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout">
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/ui/resultsdockbase.ui
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Results Viewer Panel</string>
<string>Results Viewer</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout">
Expand Down
23 changes: 16 additions & 7 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -640,7 +640,7 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
int minDockWidth( fontMetrics().width( QStringLiteral( "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ) ) );

setTabPosition( Qt::AllDockWidgetAreas, QTabWidget::North );
mGeneralDock = new QgsDockWidget( tr( "Layout Panel" ), this );
mGeneralDock = new QgsDockWidget( tr( "Layout" ), this );
mGeneralDock->setObjectName( QStringLiteral( "LayoutDock" ) );
mGeneralDock->setMinimumWidth( minDockWidth );
mGeneralPropertiesStack = new QgsPanelWidgetStack();
Expand All @@ -651,14 +651,14 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
mGeneralDock->setUserVisible( true );
} );

mItemDock = new QgsDockWidget( tr( "Item Properties Panel" ), this );
mItemDock = new QgsDockWidget( tr( "Item Properties" ), this );
mItemDock->setObjectName( QStringLiteral( "ItemDock" ) );
mItemDock->setMinimumWidth( minDockWidth );
mItemPropertiesStack = new QgsPanelWidgetStack();
mItemDock->setWidget( mItemPropertiesStack );
mPanelsMenu->addAction( mItemDock->toggleViewAction() );

mGuideDock = new QgsDockWidget( tr( "Guides Panel" ), this );
mGuideDock = new QgsDockWidget( tr( "Guides" ), this );
mGuideDock->setObjectName( QStringLiteral( "GuideDock" ) );
mGuideDock->setMinimumWidth( minDockWidth );
mGuideStack = new QgsPanelWidgetStack();
Expand All @@ -669,25 +669,25 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
mGuideDock->setUserVisible( true );
} );

mUndoDock = new QgsDockWidget( tr( "Undo History Panel" ), this );
mUndoDock = new QgsDockWidget( tr( "Undo History" ), this );
mUndoDock->setObjectName( QStringLiteral( "UndoDock" ) );
mPanelsMenu->addAction( mUndoDock->toggleViewAction() );
mUndoView = new QUndoView( this );
mUndoDock->setWidget( mUndoView );

mItemsDock = new QgsDockWidget( tr( "Items Panel" ), this );
mItemsDock = new QgsDockWidget( tr( "Items" ), this );
mItemsDock->setObjectName( QStringLiteral( "ItemsDock" ) );
mPanelsMenu->addAction( mItemsDock->toggleViewAction() );

//items tree widget
mItemsTreeView = new QgsLayoutItemsListView( mItemsDock, this );
mItemsDock->setWidget( mItemsTreeView );

mAtlasDock = new QgsDockWidget( tr( "Atlas Panel" ), this );
mAtlasDock = new QgsDockWidget( tr( "Atlas" ), this );
mAtlasDock->setObjectName( QStringLiteral( "AtlasDock" ) );
connect( mAtlasDock, &QDockWidget::visibilityChanged, mActionAtlasSettings, &QAction::setChecked );

mReportDock = new QgsDockWidget( tr( "Report Organizer Panel" ), this );
mReportDock = new QgsDockWidget( tr( "Report Organizer" ), this );
mReportDock->setObjectName( QStringLiteral( "ReportDock" ) );
connect( mReportDock, &QDockWidget::visibilityChanged, mActionReportSettings, &QAction::setChecked );

Expand Down Expand Up @@ -798,6 +798,15 @@ QMenu *QgsLayoutDesignerDialog::createPopupMenu()
{
a->setVisible( false );
}

if ( !a->property( "fixed_title" ).toBool() )
{
// append " Panel" to menu text. Only ever do this once, because the actions are not unique to
// this single popup menu
a->setText( tr( "%1 Panel" ).arg( a->text() ) );
a->setProperty( "fixed_title", true );
}

menu->addAction( a );
}
menu->addSeparator();
Expand Down
27 changes: 18 additions & 9 deletions src/app/qgisapp.cpp
Expand Up @@ -809,7 +809,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh

// create undo widget
startProfile( QStringLiteral( "Undo dock" ) );
mUndoDock = new QgsDockWidget( tr( "Undo/Redo Panel" ), this );
mUndoDock = new QgsDockWidget( tr( "Undo/Redo" ), this );
mUndoWidget = new QgsUndoWidget( mUndoDock, mMapCanvas );
mUndoWidget->setObjectName( QStringLiteral( "Undo" ) );
mUndoDock->setWidget( mUndoWidget );
Expand All @@ -819,6 +819,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
// Advanced Digitizing dock
startProfile( QStringLiteral( "Advanced digitize panel" ) );
mAdvancedDigitizingDockWidget = new QgsAdvancedDigitizingDockWidget( mMapCanvas, this );
mAdvancedDigitizingDockWidget->setWindowTitle( tr( "Advanced Digitizing" ) );
mAdvancedDigitizingDockWidget->setObjectName( QStringLiteral( "AdvancedDigitizingTools" ) );
endProfile();

Expand Down Expand Up @@ -902,7 +903,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh

startProfile( QStringLiteral( "Layer Style dock" ) );
mMapStylingDock = new QgsDockWidget( this );
mMapStylingDock->setWindowTitle( tr( "Layer Styling Panel" ) );
mMapStylingDock->setWindowTitle( tr( "Layer Styling" ) );
mMapStylingDock->setObjectName( QStringLiteral( "LayerStyling" ) );
mMapStyleWidget = new QgsLayerStylingWidget( mMapCanvas, mMapLayerPanelFactories );
mMapStylingDock->setWidget( mMapStyleWidget );
Expand Down Expand Up @@ -940,7 +941,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
endProfile();

mBrowserModel = new QgsBrowserModel( this );
mBrowserWidget = new QgsBrowserDockWidget( tr( "Browser Panel" ), mBrowserModel, this );
mBrowserWidget = new QgsBrowserDockWidget( tr( "Browser" ), mBrowserModel, this );
mBrowserWidget->setObjectName( QStringLiteral( "Browser" ) );
addDockWidget( Qt::LeftDockWidgetArea, mBrowserWidget );
mBrowserWidget->hide();
Expand All @@ -951,7 +952,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
connect( mBrowserWidget, &QgsBrowserDockWidget::openFile, this, &QgisApp::openFile );
connect( mBrowserWidget, &QgsBrowserDockWidget::handleDropUriList, this, &QgisApp::handleDropUriList );

mBrowserWidget2 = new QgsBrowserDockWidget( tr( "Browser Panel (2)" ), mBrowserModel, this );
mBrowserWidget2 = new QgsBrowserDockWidget( tr( "Browser (2)" ), mBrowserModel, this );
mBrowserWidget2->setObjectName( QStringLiteral( "Browser2" ) );
addDockWidget( Qt::LeftDockWidgetArea, mBrowserWidget2 );
mBrowserWidget2->hide();
Expand All @@ -972,7 +973,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
// create the GPS tool on starting QGIS - this is like the browser
mpGpsWidget = new QgsGpsInformationWidget( mMapCanvas );
//create the dock widget
mpGpsDock = new QgsDockWidget( tr( "GPS Information Panel" ), this );
mpGpsDock = new QgsDockWidget( tr( "GPS Information" ), this );
mpGpsDock->setObjectName( QStringLiteral( "GPSInformation" ) );
mpGpsDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
addDockWidget( Qt::LeftDockWidgetArea, mpGpsDock );
Expand All @@ -985,7 +986,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh

mLogViewer = new QgsMessageLogViewer( this );

mLogDock = new QgsDockWidget( tr( "Log Messages Panel" ), this );
mLogDock = new QgsDockWidget( tr( "Log Messages" ), this );
mLogDock->setObjectName( QStringLiteral( "MessageLog" ) );
mLogDock->setAllowedAreas( Qt::BottomDockWidgetArea | Qt::TopDockWidgetArea );
addDockWidget( Qt::BottomDockWidgetArea, mLogDock );
Expand Down Expand Up @@ -3385,7 +3386,7 @@ void QgisApp::createOverview()
// QVBoxLayout *myOverviewLayout = new QVBoxLayout;
// myOverviewLayout->addWidget(overviewCanvas);
// overviewFrame->setLayout(myOverviewLayout);
mOverviewDock = new QgsDockWidget( tr( "Overview Panel" ), this );
mOverviewDock = new QgsDockWidget( tr( "Overview" ), this );
mOverviewDock->setObjectName( QStringLiteral( "Overview" ) );
mOverviewDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
mOverviewDock->setWidget( mOverviewCanvas );
Expand Down Expand Up @@ -3618,7 +3619,7 @@ void QgisApp::initLayerTreeView()
{
mLayerTreeView->setWhatsThis( tr( "Map legend that displays all the layers currently on the map canvas. Click on the checkbox to turn a layer on or off. Double-click on a layer in the legend to customize its appearance and set other properties." ) );

mLayerTreeDock = new QgsDockWidget( tr( "Layers Panel" ), this );
mLayerTreeDock = new QgsDockWidget( tr( "Layers" ), this );
mLayerTreeDock->setObjectName( QStringLiteral( "Layers" ) );
mLayerTreeDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );

Expand Down Expand Up @@ -3715,7 +3716,7 @@ void QgisApp::initLayerTreeView()
mMapLayerOrder->setObjectName( QStringLiteral( "theMapLayerOrder" ) );

mMapLayerOrder->setWhatsThis( tr( "Map layer list that displays all layers in drawing order." ) );
mLayerOrderDock = new QgsDockWidget( tr( "Layer Order Panel" ), this );
mLayerOrderDock = new QgsDockWidget( tr( "Layer Order" ), this );
mLayerOrderDock->setObjectName( QStringLiteral( "LayerOrder" ) );
mLayerOrderDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );

Expand Down Expand Up @@ -13118,6 +13119,14 @@ QMenu *QgisApp::createPopupMenu()
menu->addAction( panelstitle );
Q_FOREACH ( QAction *a, panels )
{
if ( !a->property( "fixed_title" ).toBool() )
{
// append " Panel" to menu text. Only ever do this once, because the actions are not unique to
// this single popup menu

a->setText( tr( "%1 Panel" ).arg( a->text() ) );
a->setProperty( "fixed_title", true );
}
menu->addAction( a );
}
menu->addSeparator();
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsidentifyresultsdialog.cpp
Expand Up @@ -326,7 +326,7 @@ QgsIdentifyResultsDialog::QgsIdentifyResultsDialog( QgsMapCanvas *canvas, QWidge
mOpenFormAction->setDisabled( true );

QgsSettings mySettings;
mDock = new QgsDockWidget( tr( "Identify Results Panel" ), QgisApp::instance() );
mDock = new QgsDockWidget( tr( "Identify Results" ), QgisApp::instance() );
mDock->setObjectName( QStringLiteral( "IdentifyResultsDock" ) );
mDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
mDock->setWidget( this );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsundowidget.cpp
Expand Up @@ -190,7 +190,7 @@ void QgsUndoWidget::setupUi( QWidget *UndoWidget )

void QgsUndoWidget::retranslateUi( QWidget *UndoWidget )
{
UndoWidget->setWindowTitle( QApplication::translate( "UndoWidget", "Undo/Redo Panel", nullptr, QApplication::UnicodeUTF8 ) );
UndoWidget->setWindowTitle( QApplication::translate( "UndoWidget", "Undo/Redo", nullptr, QApplication::UnicodeUTF8 ) );
undoButton->setText( QApplication::translate( "UndoWidget", "Undo", nullptr, QApplication::UnicodeUTF8 ) );
redoButton->setText( QApplication::translate( "UndoWidget", "Redo", nullptr, QApplication::UnicodeUTF8 ) );
Q_UNUSED( UndoWidget );
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgstilescalewidget.cpp
Expand Up @@ -139,7 +139,7 @@ void QgsTileScaleWidget::showTileScale( QMainWindow *mainWindow )
}

//create the dock widget
dock = new QgsDockWidget( tr( "Tile Scale Panel" ), mainWindow );
dock = new QgsDockWidget( tr( "Tile Scale" ), mainWindow );
dock->setObjectName( QStringLiteral( "theTileScaleDock" ) );
dock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
mainWindow->addDockWidget( Qt::RightDockWidgetArea, dock );
Expand Down
31 changes: 29 additions & 2 deletions src/ui/qgsadvanceddigitizingdockwidgetbase.ui
Expand Up @@ -17,7 +17,7 @@
</size>
</property>
<property name="windowTitle">
<string>Advanced Digitizing Panel</string>
<string>Advanced Digitizing</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QGridLayout" name="gridLayout">
Expand Down Expand Up @@ -534,7 +534,34 @@
<tabstop>mRepeatingLockYButton</tabstop>
</tabstops>
<resources>
<include location="../plugins/georeferencer/georeferencer.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
</resources>
<connections/>
Expand Down
30 changes: 29 additions & 1 deletion src/ui/qgsbookmarksbase.ui
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Spatial Bookmarks Panel</string>
<string>Spatial Bookmarks</string>
</property>
<widget class="QWidget" name="bookmarksDockContents">
<layout class="QGridLayout" name="gridLayout">
Expand Down Expand Up @@ -114,6 +114,34 @@
</customwidgets>
<resources>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
</resources>
<connections/>
</ui>
30 changes: 29 additions & 1 deletion src/ui/qgsidentifyresultsbase.ui
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Identify Results Panel</string>
<string>Identify Results</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
Expand Down Expand Up @@ -351,6 +351,34 @@
</customwidgets>
<resources>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
</resources>
<connections/>
</ui>
2 changes: 1 addition & 1 deletion src/ui/qgslocatoroptionswidgetbase.ui
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Spatial Bookmarks Panel</string>
<string>Locator Options</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="1,0">
<property name="leftMargin">
Expand Down

0 comments on commit 5f66494

Please sign in to comment.