Skip to content
Permalink
Browse files

[bugfix][hidpi] Scalable SVG theme cursors

Add support for SVG cursor:

      ZoomIn,
      ZoomOut,
      Identify,
      CrossHair,
      CapturePoint,
      Select,
      Sampler,

Icons are provisional: they need some love from
a decent graphics designer.

Fixes #12671
  • Loading branch information
elpaso committed Nov 27, 2017
1 parent 72553a6 commit 7ae8e16427e5757d209f6cb18d1b247de8ef6be1
Showing with 663 additions and 322 deletions.
  1. +7 −0 images/images.qrc
  2. +1 −0 images/themes/default/cursors/mCapturePoint.svg
  3. +63 −0 images/themes/default/cursors/mCrossHair.svg
  4. +74 −0 images/themes/default/cursors/mIdentify.svg
  5. +52 −0 images/themes/default/cursors/mSampler.svg
  6. +68 −0 images/themes/default/cursors/mSelect.svg
  7. +127 −0 images/themes/default/cursors/mZoomIn.svg
  8. +128 −0 images/themes/default/cursors/mZoomOut.svg
  9. +18 −0 python/core/qgsapplication.sip
  10. +0 −1 src/app/composer/qgscomposer.cpp
  11. +0 −1 src/app/qgisapp.cpp
  12. +1 −7 src/app/qgsmaptoolidentifyaction.cpp
  13. +1 −3 src/app/qgsmaptoolselectrectangle.cpp
  14. +1 −3 src/app/qgsmeasuretool.cpp
  15. +59 −0 src/core/qgsapplication.cpp
  16. +22 −0 src/core/qgsapplication.h
  17. +0 −2 src/gui/CMakeLists.txt
  18. +1 −3 src/gui/layout/qgslayoutviewtooladditem.cpp
  19. +1 −3 src/gui/layout/qgslayoutviewtooladdnodeitem.cpp
  20. +3 −4 src/gui/layout/qgslayoutviewtooltemporarykeyzoom.cpp
  21. +9 −10 src/gui/layout/qgslayoutviewtoolzoom.cpp
  22. +1 −3 src/gui/qgscolorbutton.cpp
  23. +0 −1 src/gui/qgscolordialog.cpp
  24. +17 −25 src/gui/qgscomposerview.cpp
  25. +1 −3 src/gui/qgscompoundcolorwidget.cpp
  26. +0 −191 src/gui/qgscursors.cpp
  27. +0 −38 src/gui/qgscursors.h
  28. +1 −3 src/gui/qgsmapcanvas.cpp
  29. +1 −3 src/gui/qgsmaptoolcapture.cpp
  30. +1 −4 src/gui/qgsmaptoolidentify.cpp
  31. +1 −3 src/gui/qgsmaptoolidentifyfeature.cpp
  32. +0 −1 src/gui/qgsmaptoolpan.cpp
  33. +2 −3 src/gui/qgsmaptoolzoom.cpp
  34. +1 −4 src/plugins/coordinate_capture/coordinatecapturemaptool.cpp
  35. +1 −3 src/plugins/evis/idtool/eviseventidtool.cpp
@@ -604,6 +604,13 @@
<file>themes/default/mActionResizeSquare.svg</file>
<file>themes/default/mSourceFields.svg</file>
<file>flags/zh_Hant.svg</file>
<file>themes/default/cursors/mCapturePoint.svg</file>
<file>themes/default/cursors/mCrossHair.svg</file>
<file>themes/default/cursors/mSampler.svg</file>
<file>themes/default/cursors/mSelect.svg</file>
<file>themes/default/cursors/mZoomIn.svg</file>
<file>themes/default/cursors/mZoomOut.svg</file>
<file>themes/default/cursors/mIdentify.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
@@ -0,0 +1 @@
<?xml version="1.0"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="600" height="600"><circle cx="300" cy="300" r="240" style="fill: none; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 20px;"></circle><circle cx="300" cy="300" r="60" style="fill: none; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 20px;"></circle><line x1="300" y1="0" x2="300" y2="600" style="stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 20px;"></line><line x1="0" y1="300" x2="600" y2="300" style="stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 20px;"></line></svg>
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->

<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="Capa_1"
x="0px"
y="0px"
viewBox="0 0 497.867 497.867"
style="enable-background:new 0 0 497.867 497.867;"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="mCrossHair.svg"><metadata
id="metadata43"><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></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1071"
inkscape:window-height="548"
id="namedview39"
showgrid="false"
inkscape:zoom="0.47402217"
inkscape:cx="246.8239"
inkscape:cy="248.9335"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="Capa_1" /><g
id="g3"><g
id="g5"><path
style="fill:#010002;"
d="M477.546,228.616h-53.567c-9.827-80.034-74.019-143.608-154.719-153.134V20.321 C269.259,9.096,260.155,0,248.938,0c-11.226,0-20.321,9.096-20.321,20.321v54.974c-81.375,8.941-146.257,72.808-156.15,153.313 H20.321C9.096,228.608,0,237.704,0,248.929s9.096,20.321,20.321,20.321H72.19c8.99,81.513,74.328,146.428,156.426,155.451v52.844 c0,11.226,9.096,20.321,20.321,20.321c11.217,0,20.321-9.096,20.321-20.321v-53.023c81.416-9.608,146.054-74.222,154.996-155.264 h53.291c11.226,0,20.321-9.096,20.321-20.321S488.771,228.616,477.546,228.616z M269.259,383.392v-67.028 c0-11.226-9.104-20.321-20.321-20.321c-11.226,0-20.321,9.096-20.321,20.321v67.24c-59.607-8.551-106.753-55.299-115.312-114.345 h68.207c11.226,0,20.321-9.096,20.321-20.321s-9.096-20.321-20.321-20.321h-67.882c9.38-58.046,56.103-103.761,114.987-112.215 v65.11c0,11.226,9.096,20.321,20.321,20.321c11.217,0,20.321-9.096,20.321-20.321v-64.899 c58.209,8.982,104.249,54.421,113.556,112.004h-66.459c-11.226,0-20.321,9.096-20.321,20.321s9.096,20.321,20.321,20.321h66.793 C374.646,327.842,328.191,374.297,269.259,383.392z"
id="path7" /></g></g><g
id="g9" /><g
id="g11" /><g
id="g13" /><g
id="g15" /><g
id="g17" /><g
id="g19" /><g
id="g21" /><g
id="g23" /><g
id="g25" /><g
id="g27" /><g
id="g29" /><g
id="g31" /><g
id="g33" /><g
id="g35" /><g
id="g37" /></svg>
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->

<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="Capa_1"
x="0px"
y="0px"
viewBox="0 0 297 297"
style="enable-background:new 0 0 297 297;"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="mIdentify.svg"><metadata
id="metadata45"><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></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs43" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2237"
inkscape:window-height="1220"
id="namedview41"
showgrid="false"
inkscape:zoom="2.2475044"
inkscape:cx="-35.031673"
inkscape:cy="135.43738"
inkscape:window-x="589"
inkscape:window-y="418"
inkscape:window-maximized="0"
inkscape:current-layer="g3" /><g
id="g3"><path
d="m 170.32601,129.42563 42.749,-24.76 c 3.358,-1.945 5.309,-5.634995 5.029,-9.503995 -0.28,-3.867 -2.743,-7.238 -6.344,-8.68 l -190.741003,-76.277 c -3.759,-1.504 -8.057,-0.625 -10.924,2.238 -2.8669997,2.861 -3.7549997,7.156 -2.2579997,10.918 L 83.902007,214.63863 c 1.436,3.613 4.81,6.084 8.688,6.365 3.896,0.272 7.571003,-1.685 9.512003,-5.051 l 24.658,-42.816 59.882,60.053 c 1.903,1.906 4.483,2.978 7.179,2.978 2.692,0 5.275,-1.072 7.176,-2.98 l 29.257,-29.342 c 3.945,-3.957 3.945,-10.359 0,-14.313 l -59.928,-60.107 z m 23.495,82.252 -62.057,-62.232 c -1.916,-1.918 -4.504,-2.979 -7.177,-2.979 -0.44,0 -0.881,0.029 -1.323,0.086 -3.127,0.414 -5.888,2.258 -7.461,4.992 l -20.810003,36.131 -59.605,-149.892995 149.497003,59.783 -36.117,20.919995 c -2.722,1.576 -4.556,4.326 -4.969,7.445 -0.409,3.119 0.651,6.254 2.872,8.479 l 62.093,62.277 -14.943,14.991 z"
id="path5"
inkscape:connector-curvature="0" /><text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:218.373703px;line-height:125%;font-family:Georgia;-inkscape-font-specification:'Georgia, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="214.27585"
y="268.9241"
id="text3377"
sodipodi:linespacing="125%"
transform="scale(1.0538776,0.9488768)"><tspan
sodipodi:role="line"
id="tspan3379"
x="214.27585"
y="268.9241">i</tspan></text>
</g><g
id="g11" /><g
id="g13" /><g
id="g15" /><g
id="g17" /><g
id="g19" /><g
id="g21" /><g
id="g23" /><g
id="g25" /><g
id="g27" /><g
id="g29" /><g
id="g31" /><g
id="g33" /><g
id="g35" /><g
id="g37" /><g
id="g39" /></svg>
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->

<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"
id="Layer_1"
enable-background="new 0 0 100 100"
xml:space="preserve"
viewBox="0 0 100 100"
version="1.1"
y="0px"
x="0px"
inkscape:version="0.91 r13725"
sodipodi:docname="mSampler.svg"><defs
id="defs13" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1071"
inkscape:window-height="548"
id="namedview11"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="49.576271"
inkscape:cy="50"
inkscape:window-x="1188"
inkscape:window-y="1073"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g3"><g
id="g5"><path
d="m91.645 8.355c-4.474-4.474-11.727-4.474-16.2 0l-13.5 13.501-3.727-3.727c-1.959-1.959-5.134-1.959-7.093 0s-1.959 5.134 0 7.093l3.727 3.727-41.51 41.508c-2.039 2.039-3.149 4.656-3.329 7.324-0.073 1.087-0.347 3.105-0.675 5.292-0.053 0.359-0.212 0.706-0.487 0.983l-3.105 3.106c-0.994 0.994-0.994 2.606 0 3.6l3.493 3.493c0.994 0.994 2.606 0.994 3.6 0l3.106-3.105c0.277-0.275 0.622-0.433 0.981-0.486 2.187-0.329 4.205-0.602 5.293-0.675 2.668-0.18 5.285-1.29 7.325-3.33l41.508-41.508 3.727 3.727c1.959 1.959 5.134 1.959 7.093 0s1.959-5.134 0-7.093l-12.365-12.366 9.697 7.577 12.44-12.441c4.475-4.473 4.474-11.726 0.001-16.2zm-26.594 34.394l-20.53 20.53c-0.994 0.994-2.606 0.994-3.6 0l-3.27-3.27c-0.994-0.993-2.605-0.993-3.599 0.001l-0.616 0.616-0.002-0.002-14.728 14.727c-0.337 0.337-0.819 0.401-1.076 0.143s-0.194-0.74 0.143-1.076l23.841-23.841 0.004 0.004 15.633-15.633c0.994-0.994 2.606-0.994 3.6 0l4.2 4.201c0.994 0.994 0.994 2.606 0 3.6z"
id="path7" /></g></g><metadata
id="metadata9"><rdf:RDF><cc:Work><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" /><dc:publisher><cc:Agent
rdf:about="http://openclipart.org/"><dc:title>Openclipart</dc:title></cc:Agent></dc:publisher><dc:title></dc:title></cc:Work><cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/"><cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /></cc:License></rdf:RDF></metadata></svg>
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->

<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="Capa_1"
x="0px"
y="0px"
viewBox="0 0 297 297"
style="enable-background:new 0 0 297 297;"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="mSelect.svg"><metadata
id="metadata45"><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></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs43" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2237"
inkscape:window-height="1220"
id="namedview41"
showgrid="false"
inkscape:zoom="2.2475044"
inkscape:cx="101.24242"
inkscape:cy="135.43738"
inkscape:window-x="589"
inkscape:window-y="418"
inkscape:window-maximized="0"
inkscape:current-layer="g3" /><g
id="g3"><path
d="m 170.32601,129.42563 42.749,-24.76 c 3.358,-1.945 5.309,-5.634995 5.029,-9.503995 -0.28,-3.867 -2.743,-7.238 -6.344,-8.68 l -190.741003,-76.277 c -3.759,-1.504 -8.057,-0.625 -10.924,2.238 -2.8669997,2.861 -3.7549997,7.156 -2.2579997,10.918 L 83.902007,214.63863 c 1.436,3.613 4.81,6.084 8.688,6.365 3.896,0.272 7.571003,-1.685 9.512003,-5.051 l 24.658,-42.816 59.882,60.053 c 1.903,1.906 4.483,2.978 7.179,2.978 2.692,0 5.275,-1.072 7.176,-2.98 l 29.257,-29.342 c 3.945,-3.957 3.945,-10.359 0,-14.313 l -59.928,-60.107 z m 23.495,82.252 -62.057,-62.232 c -1.916,-1.918 -4.504,-2.979 -7.177,-2.979 -0.44,0 -0.881,0.029 -1.323,0.086 -3.127,0.414 -5.888,2.258 -7.461,4.992 l -20.810003,36.131 -59.605,-149.892995 149.497003,59.783 -36.117,20.919995 c -2.722,1.576 -4.556,4.326 -4.969,7.445 -0.409,3.119 0.651,6.254 2.872,8.479 l 62.093,62.277 -14.943,14.991 z"
id="path5"
inkscape:connector-curvature="0" /><rect
style="fill:none;stroke:#000000;stroke-width:8.69999981;stroke-miterlimit:4;stroke-dasharray:34.79999924,17.39999962;stroke-linejoin:round;stroke-linecap:round;stroke-dashoffset:16.52999964"
id="rect3355"
width="268.29758"
height="257.17413"
x="5.7841935"
y="7.3453946" /></g><g
id="g11" /><g
id="g13" /><g
id="g15" /><g
id="g17" /><g
id="g19" /><g
id="g21" /><g
id="g23" /><g
id="g25" /><g
id="g27" /><g
id="g29" /><g
id="g31" /><g
id="g33" /><g
id="g35" /><g
id="g37" /><g
id="g39" /></svg>

0 comments on commit 7ae8e16

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