Skip to content

Commit

Permalink
Predifine icon size as a var instead of redecllaring each time
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7957 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 14, 2008
1 parent 48ed55d commit 6a1dced
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,14 +951,16 @@ void QgisApp::createMenus()

void QgisApp::createToolBars()
{
QSize myIconSize ( 24,24 );
//QSize myIconSize ( 32,32 ); //large icons
// Note: we need to set each object name to ensure that
// qmainwindow::saveState and qmainwindow::restoreState
// work properly

//
// File Toolbar
mFileToolBar = addToolBar(tr("File"));
mFileToolBar->setIconSize(QSize(24,24));
mFileToolBar->setIconSize(myIconSize);
mFileToolBar->setObjectName("FileToolBar");
mFileToolBar->addAction(mActionFileNew);
mFileToolBar->addAction(mActionFileNew);
Expand All @@ -969,7 +971,7 @@ void QgisApp::createToolBars()
//
// Layer Toolbar
mLayerToolBar = addToolBar(tr("Manage Layers"));
mLayerToolBar->setIconSize(QSize(24,24));
mLayerToolBar->setIconSize(myIconSize);
mLayerToolBar->setObjectName("LayerToolBar");
mLayerToolBar->addAction(mActionAddNonDbLayer);
mLayerToolBar->addAction(mActionAddRasterLayer);
Expand All @@ -987,14 +989,14 @@ void QgisApp::createToolBars()
//
// Help Toolbar
mHelpToolBar = addToolBar(tr("Help"));
mHelpToolBar->setIconSize(QSize(24,24));
mHelpToolBar->setIconSize(myIconSize);
mHelpToolBar->setObjectName("Help");
mHelpToolBar->addAction(mActionHelpContents);
mHelpToolBar->addAction(QWhatsThis::createAction());
//
// Digitizing Toolbar
mDigitizeToolBar = addToolBar(tr("Digitizing"));
mDigitizeToolBar->setIconSize(QSize(24,24));
mDigitizeToolBar->setIconSize(myIconSize);
mDigitizeToolBar->setObjectName("Digitizing");
mDigitizeToolBar->addAction(mActionToggleEditing);
mDigitizeToolBar->addAction(mActionCapturePoint);
Expand All @@ -1014,7 +1016,7 @@ void QgisApp::createToolBars()
//
// Map Navigation Toolbar
mMapNavToolBar = addToolBar(tr("Map Navigation"));
mMapNavToolBar->setIconSize(QSize(24,24));
mMapNavToolBar->setIconSize(myIconSize);
mMapNavToolBar->setObjectName("Map Navigation");
mMapNavToolBar->addAction(mActionPan);
mMapNavToolBar->addAction(mActionZoomIn);
Expand All @@ -1027,7 +1029,7 @@ void QgisApp::createToolBars()
//
// Attributes Toolbar
mAttributesToolBar = addToolBar(tr("Attributes"));
mAttributesToolBar->setIconSize(QSize(24,24));
mAttributesToolBar->setIconSize(myIconSize);
mAttributesToolBar->setObjectName("Attributes");
mAttributesToolBar->addAction(mActionIdentify);
mAttributesToolBar->addAction(mActionSelect);
Expand All @@ -1039,7 +1041,7 @@ void QgisApp::createToolBars()
//
// Plugins Toolbar
mPluginToolBar = addToolBar(tr("Plugins"));
mPluginToolBar->setIconSize(QSize(24,24));
mPluginToolBar->setIconSize(myIconSize);
mPluginToolBar->setObjectName("Plugins");

//Add the menu for toolbar visibility here
Expand Down

0 comments on commit 6a1dced

Please sign in to comment.