Fix cursor

This commit is contained in:
2026-02-14 21:50:54 -07:00
parent 91f1a0e02a
commit f30eac7c06
3 changed files with 42 additions and 1 deletions

40
icons/cursor.svg Normal file
View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 27.031977 43.003963"
width="27.031977"
height="43.003963"
version="1.1"
id="svg4"
sodipodi:docname="cursor.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="7.2619866"
inkscape:cx="30.432444"
inkscape:cy="7.0917233"
inkscape:window-width="2117"
inkscape:window-height="1288"
inkscape:window-x="26"
inkscape:window-y="23"
inkscape:window-maximized="0"
inkscape:current-layer="svg4" />
<path
d="m 1.284289,0.5 c -0.03125,0.00781 -0.0625,0.019531 -0.09375,0.03125 -0.042969,0.019531 -0.085937,0.039063 -0.125,0.0625 H 1.034289 C 1.014758,0.60156 0.99132,0.613281 0.971789,0.625 L 0.940539,0.65625 0.909289,0.6875 C 0.878039,0.707031 0.846789,0.726563 0.815539,0.75 0.792102,0.769531 0.77257,0.789063 0.753039,0.8125 0.74132,0.832031 0.729602,0.855469 0.721789,0.875 0.686633,0.914063 0.655383,0.957031 0.628039,1 L 0.596789,1.03125 V 1.0625 C 0.58507,1.082031 0.573352,1.105469 0.565539,1.125 l -0.03125,0.03125 v 0.0625 C 0.52257,1.257813 0.510852,1.300781 0.503039,1.34375 V 1.4375 1.46875 1.5 c -0.00391,0.050781 -0.00391,0.105469 0,0.15625 V 34.5 c 0.00391,0.398438 0.242188,0.757813 0.609375,0.914063 0.363281,0.15625 0.789063,0.07813 1.078125,-0.195313 l 7.2500003,-6.8125 5.8437497,13.5 c 0.109375,0.246094 0.3125,0.441406 0.566406,0.535156 0.253907,0.09375 0.535157,0.08203 0.777343,-0.03516 l 4.375,-2 c 0.496094,-0.226562 0.71875,-0.8125 0.5,-1.3125 l -6.093749,-13.3125 10.1875,-0.875 c 0.402343,-0.02734 0.75,-0.292969 0.882812,-0.675781 0.128906,-0.382813 0.01563,-0.808594 -0.289062,-1.074219 L 2.346789,0.9375 C 2.299914,0.878906 2.249133,0.828125 2.190539,0.78125 2.151477,0.734375 2.112414,0.695313 2.065539,0.65625 H 2.034289 C 2.014758,0.632813 1.995227,0.613281 1.971789,0.59375 H 1.940539 C 1.889758,0.570313 1.838977,0.546875 1.784289,0.53125 H 1.753039 C 1.733508,0.519531 1.71007,0.507813 1.690539,0.5 h -0.03125 -0.0625 -0.03125 -0.0625 -0.03125 -0.09375 z"
id="path2"
style="fill:#ffffff;stroke:#000000"
sodipodi:nodetypes="ccccccccccccccccccccccccccsccccccccccccccccccccccc" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -6,5 +6,6 @@
<file>icons/rectangle.svg</file> <file>icons/rectangle.svg</file>
<file>icons/circle.svg</file> <file>icons/circle.svg</file>
<file>icons/save-sketch.svg</file> <file>icons/save-sketch.svg</file>
<file>icons/cursor.svg</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@@ -404,7 +404,7 @@ void ViewportWidget::onActiveToolChanged(int tool)
// Render arrow cursor from SVG // Render arrow cursor from SVG
if (m_cursorRenderer && m_cursorRenderer->isValid()) { if (m_cursorRenderer && m_cursorRenderer->isValid()) {
m_cursorRenderer->render(&painter, QRectF(0, 0, 16, 16)); m_cursorRenderer->render(&painter, QRectF(0, 0, 14, 22));
} }
// Render tool icon // Render tool icon