Skip to content
Permalink
Browse files

[gui] sync layer right-click menu & composer legend item icons

  • Loading branch information
nirvn committed Jun 7, 2015
1 parent faf3bcd commit 1b4fe75ab34d1781bc943d0bc3a0f99072d7857e
@@ -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>
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg5477"
viewBox="0 0 4.2333333 4.2333335"
height="16"
width="16"
inkscape:version="0.91+devel r"
sodipodi:docname="mActionAddGroup.svg">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1549"
inkscape:window-height="876"
id="namedview20"
showgrid="true"
inkscape:zoom="9.8333331"
inkscape:cx="59.66801"
inkscape:cy="-11.884195"
inkscape:window-x="51"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg5477">
<inkscape:grid
type="xygrid"
id="grid4141" />
</sodipodi:namedview>
<defs
id="defs5479" />
<metadata
id="metadata5482">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<path
inkscape:connector-curvature="0"
style="display:inline;fill:#eeeeec;fill-opacity:1;stroke:#888a85;stroke-width:0.26458335;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
d="m 1.4552084,0.66145835 2.1166667,0 0,2.11666665 -2.1166667,0 0,-2.11666665 z"
id="rect4012-9-8-9-0-6-5" />
<path
inkscape:connector-curvature="0"
style="display:inline;fill:#eeeeec;fill-opacity:1;stroke:#888a85;stroke-width:0.26458335;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
d="m 0.9260417,1.190625 2.1166667,0 0,2.1166666 -2.1166667,0 0,-2.1166666 z"
id="rect4012-9-8-9-0-6-4" />
<path
style="fill:none;fill-rule:evenodd;stroke:#415a75;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 1.9843547,1.5875 4.06e-5,1.0583261 c 0.00603,0.1622428 0.524478,0.1760075 0.5291464,1.46e-5 l 0,-2.2303419 c 0,-0.30092221 -0.5291667,-0.28575163 -0.5291667,-1.449e-5 l 0,0.11368236"
id="path4199"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#888a85;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 0.3968752,2.5026501 0,1.3338083 1.5983331,0"
id="path4210"
inkscape:connector-curvature="0" />
<g
style="display:inline"
id="g3772"
transform="matrix(0.12211529,0,0,0.12211529,0.06106014,0.32564351)">
<rect
ry="2.6149368"
inkscape:export-ydpi="120"
inkscape:export-xdpi="120"
y="19"
x="19"
height="13"
width="13"
id="rect3563"
style="display:inline;fill:#5a8c5a;fill-opacity:1;stroke:#555753;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:export-filename="C:\Program Files\QGIS-Dev\themes\gis-0.1\mActionAddOgrLayer.png"
rx="2.6149371" />
<path
inkscape:connector-curvature="0"
style="display:inline;overflow:visible;visibility:visible;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.5999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
d="m 21.6,25.499999 7.8,0"
id="path3807"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path3809"
d="M 25.5,29.399999 25.5,21.6"
style="display:inline;overflow:visible;visibility:visible;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.5999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccsssc"
id="path6992"
d="m 20.3,25.499999 10.4,0 c 0,0 0,0 0,-2.6 C 30.7,20.3 30.05,20.3 25.5,20.3 c -4.55,0 -5.2,0 -5.2,2.599999 0,2.6 0,2.6 0,2.6 z"
style="display:inline;opacity:0.3;fill:#fcffff;fill-rule:evenodd;stroke:none;enable-background:new" />
</g>
</svg>
@@ -9,9 +9,9 @@
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg5477"
viewBox="0 0 6.3499999 6.3500002"
height="24"
width="24"
viewBox="0 0 4.2333333 4.2333335"
height="16"
width="16"
inkscape:version="0.91+devel r"
sodipodi:docname="mActionFolder.svg">
<sodipodi:namedview
@@ -23,17 +23,21 @@
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="875"
inkscape:window-width="1549"
inkscape:window-height="876"
id="namedview20"
showgrid="false"
inkscape:zoom="2.4583333"
inkscape:cx="89.214916"
inkscape:cy="-23.280641"
inkscape:window-x="0"
inkscape:window-y="25"
showgrid="true"
inkscape:zoom="39.333332"
inkscape:cx="10.374756"
inkscape:cy="6.6662709"
inkscape:window-x="51"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg5477" />
inkscape:current-layer="svg5477">
<inkscape:grid
type="xygrid"
id="grid4141" />
</sodipodi:namedview>
<defs
id="defs5479" />
<metadata
@@ -50,23 +54,23 @@
</metadata>
<path
inkscape:connector-curvature="0"
style="display:inline;fill:#eeeeec;fill-opacity:1;stroke:#888a85;stroke-width:0.29872316;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
d="m 2.0148354,0.91066875 3.4054436,0 0,3.40544355 -3.4054436,0 0,-3.40544355 z"
style="display:inline;fill:#eeeeec;fill-opacity:1;stroke:#888a85;stroke-width:0.26458335;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
d="m 1.4552084,0.66145835 2.1166667,0 0,2.11666665 -2.1166667,0 0,-2.11666665 z"
id="rect4012-9-8-9-0-6-5" />
<path
inkscape:connector-curvature="0"
style="display:inline;fill:#eeeeec;fill-opacity:1;stroke:#888a85;stroke-width:0.29872316;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
d="m 0.94311159,1.7368615 3.40544361,0 0,3.4054436 -3.40544361,0 0,-3.4054436 z"
style="display:inline;fill:#eeeeec;fill-opacity:1;stroke:#888a85;stroke-width:0.26458335;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
d="m 0.9260417,1.190625 2.1166667,0 0,2.1166666 -2.1166667,0 0,-2.1166666 z"
id="rect4012-9-8-9-0-6-4" />
<path
style="fill:none;fill-rule:evenodd;stroke:#415a75;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3.2462835,2.460066 0,1.4170905 c 0.010264,0.2754011 0.6109093,0.2987416 0.618856,0 l 0,-3.27814144 c 0,-0.51080442 -0.9148305,-0.48502823 -0.9148305,0 l 0,0.16446453"
d="m 1.9843547,1.5875036 4.06e-5,1.0583261 c 0.00603,0.1622428 0.524478,0.1760039 0.5291464,1.1e-5 l 0,-2.2303419 c 0,-0.30092221 -0.5291667,-0.28575163 -0.5291667,-1.449e-5 l 0,0.11368236"
id="path4199"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#888a85;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 0.39687501,3.4244512 0,2.2640905 2.72071329,0"
d="m 0.3968752,2.5026501 0,1.3338083 1.5983331,0"
id="path4210"
inkscape:connector-curvature="0" />
</svg>
@@ -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() ) );

@@ -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
}
@@ -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;
}
@@ -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>
@@ -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>

0 comments on commit 1b4fe75

Please sign in to comment.
You can’t perform that action at this time.