Skip to content

Commit

Permalink
[gui] sync layer right-click menu & composer legend item icons
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jun 7, 2015
1 parent faf3bcd commit 1b4fe75
Show file tree
Hide file tree
Showing 7 changed files with 146 additions and 24 deletions.
1 change: 1 addition & 0 deletions images/images.qrc
Expand Up @@ -107,6 +107,7 @@
<file>themes/default/mActionAddBasicShape.png</file>
<file>themes/default/mActionAddGPSLayer.png</file>
<file>themes/default/mActionAddGroup.png</file>
<file>themes/default/mActionAddGroup.svg</file>
<file>themes/default/mActionAddHtml.png</file>
<file>themes/default/mActionAddImage.png</file>
<file>themes/default/mActionAddLegend.png</file>
Expand Down
111 changes: 111 additions & 0 deletions images/themes/default/mActionAddGroup.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 22 additions & 18 deletions images/themes/default/mActionFolder.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -2480,7 +2480,7 @@ void QgisApp::initLayerTreeView()

// add group action
QAction* actionAddGroup = new QAction( tr( "Add Group" ), this );
actionAddGroup->setIcon( QgsApplication::getThemeIcon( "/mActionFolder.svg" ) );
actionAddGroup->setIcon( QgsApplication::getThemeIcon( "/mActionAddGroup.svg" ) );
actionAddGroup->setToolTip( tr( "Add Group" ) );
connect( actionAddGroup, SIGNAL( triggered( bool ) ), mLayerTreeView->defaultActions(), SLOT( addGroup() ) );

Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -34,8 +34,8 @@ QMenu* QgsAppLayerTreeViewMenuProvider::createContextMenu()
// global menu
menu->addAction( actions->actionAddGroup( menu ) );

menu->addAction( QgsApplication::getThemeIcon( "/mActionExpandTree.png" ), tr( "&Expand All" ), mView, SLOT( expandAll() ) );
menu->addAction( QgsApplication::getThemeIcon( "/mActionCollapseTree.png" ), tr( "&Collapse All" ), mView, SLOT( collapseAll() ) );
menu->addAction( QgsApplication::getThemeIcon( "/mActionExpandTree.svg" ), tr( "&Expand All" ), mView, SLOT( expandAll() ) );
menu->addAction( QgsApplication::getThemeIcon( "/mActionCollapseTree.svg" ), tr( "&Collapse All" ), mView, SLOT( collapseAll() ) );

// TODO: update drawing order
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/layertree/qgslayertreeviewdefaultactions.cpp
Expand Up @@ -33,7 +33,7 @@ QgsLayerTreeViewDefaultActions::QgsLayerTreeViewDefaultActions( QgsLayerTreeView

QAction* QgsLayerTreeViewDefaultActions::actionAddGroup( QObject* parent )
{
QAction* a = new QAction( QgsApplication::getThemeIcon( "/mActionFolder.png" ), tr( "&Add Group" ), parent );
QAction* a = new QAction( QgsApplication::getThemeIcon( "/mActionAddGroup.svg" ), tr( "&Add Group" ), parent );
connect( a, SIGNAL( triggered() ), this, SLOT( addGroup() ) );
return a;
}
Expand Down
10 changes: 8 additions & 2 deletions src/ui/qgscomposerlegendwidgetbase.ui
Expand Up @@ -279,7 +279,13 @@
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionAddGroup.png</normaloff>:/images/themes/default/mActionAddGroup.png</iconset>
<normaloff>:/images/themes/default/mActionAddGroup.svg</normaloff>:/images/themes/default/mActionAddGroup.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</widget>
</item>
Expand Down Expand Up @@ -367,7 +373,7 @@
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionFilter.png</normaloff>:/images/themes/default/mActionFilter.png</iconset>
<normaloff>:/images/themes/default/mActionFilter2.svg</normaloff>:/images/themes/default/mActionFilter2.svg</iconset>
</property>
<property name="iconSize">
<size>
Expand Down

0 comments on commit 1b4fe75

Please sign in to comment.