diff options
| author | Martin Owens <doctormo@gmail.com> | 2019-02-25 01:57:29 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2019-02-25 01:57:29 +0000 |
| commit | eccaee3d16d72776f9d25cdfd469e2bfc07a9eb3 (patch) | |
| tree | 20b5203dca58ddfc8f29ab112cf6d07af65c078f | |
| parent | Merge in bazaar branch for alignment handles (diff) | |
| download | inkscape-eccaee3d16d72776f9d25cdfd469e2bfc07a9eb3.tar.gz inkscape-eccaee3d16d72776f9d25cdfd469e2bfc07a9eb3.zip | |
Add option for on canvas align handles and move group selection checkbox
| -rw-r--r-- | share/icons/hicolor/scalable/actions/align-on-canvas.svg | 181 | ||||
| -rw-r--r-- | share/icons/hicolor/scalable/actions/align-sel-as-group.svg | 247 | ||||
| -rw-r--r-- | share/icons/hicolor/symbolic/actions/align-on-canvas.svg | 119 | ||||
| -rw-r--r-- | share/icons/hicolor/symbolic/actions/align-sel-as-group.svg | 120 | ||||
| -rw-r--r-- | src/seltrans.cpp | 5 | ||||
| -rw-r--r-- | src/ui/dialog/align-and-distribute.cpp | 32 | ||||
| -rw-r--r-- | src/ui/dialog/align-and-distribute.h | 5 |
7 files changed, 698 insertions, 11 deletions
diff --git a/share/icons/hicolor/scalable/actions/align-on-canvas.svg b/share/icons/hicolor/scalable/actions/align-on-canvas.svg new file mode 100644 index 000000000..d6c6f08bd --- /dev/null +++ b/share/icons/hicolor/scalable/actions/align-on-canvas.svg @@ -0,0 +1,181 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) and export_objects.py --> + +<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:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="svg1" + width="16" + height="16" + viewBox="0 0 16 16" + sodipodi:docname="align-on-canvas.svg" + inkscape:version="0.92.4 (unknown)"> + <defs + id="defs10"> + <linearGradient + y2="214.5512" + y1="218.8883" + xlink:href="#linearGradient5740" + x2="17.15024" + x1="18.50864" + inkscape:collect="always" + id="linearGradient5551" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.026443,0,0,1.557511,-54.13118,-158.6166)" /> + <linearGradient + y2="209.2774" + y1="203.3658" + xlink:href="#linearGradient5704" + x2="14.01084" + x1="10.04167" + inkscape:collect="always" + id="linearGradient5549" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.114324,0,0,1.002646,-47.33758,-30.1841)" /> + <linearGradient + id="linearGradient5704"> + <stop + style="stop-color:#5a5a5a;stop-opacity:1" + offset="0" + id="stop5706" /> + <stop + style="stop-color:#000000;stop-opacity:1" + offset="1" + id="stop5708" /> + </linearGradient> + <linearGradient + id="linearGradient5740"> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="0" + id="stop5742" /> + <stop + style="stop-color:#98b6d3;stop-opacity:1" + offset="1" + id="stop5744" /> + </linearGradient> + <linearGradient + y2="219.4184" + y1="213.872" + xlink:href="#linearGradient5740" + x2="19.38252" + x1="15.74156" + inkscape:collect="always" + id="linearGradient5553" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.525151,0,0,0.933201,-44.88385,-23.1282)" /> + </defs> + <sodipodi:namedview + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + id="namedview" + showgrid="true" + inkscape:zoom="27.166187" + inkscape:cx="-1.3875431" + inkscape:cy="8.9906751" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:current-layer="layercompo"> + <inkscape:grid + type="xygrid" + id="grid" /> + </sodipodi:namedview> + <metadata + id="metadata1906"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <cc:license + rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" /> + <dc:title>LiveEffect Icons proposal</dc:title> + <dc:date>13 Jan 2019</dc:date> + <dc:creator> + <cc:Agent> + <dc:title>Ramón Miranda</dc:title> + </cc:Agent> + </dc:creator> + <dc:rights> + <cc:Agent> + <dc:title>see the license tab</dc:title> + </cc:Agent> + </dc:rights> + <dc:subject> + <rdf:Bag> + <rdf:li>icon ui</rdf:li> + </rdf:Bag> + </dc:subject> + <dc:description>This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI)</dc:description> + <dc:publisher> + <cc:Agent> + <dc:title /> + </cc:Agent> + </dc:publisher> + <dc:identifier /> + <dc:source /> + <dc:relation /> + <dc:language>-</dc:language> + <dc:coverage /> + <dc:contributor> + <cc:Agent> + <dc:title>Ramon Miranda +Jabier Arraiza</dc:title> + </cc:Agent> + </dc:contributor> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/publicdomain/zero/1.0/"> + <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> + <g + inkscape:groupmode="layer" + id="layercompo" + inkscape:label="dashed-stroke"> + <path + id="rect22048" + d="M 0,0 H 16 V 16 H 0 Z" + style="opacity:0;fill:none" /> + <path + inkscape:connector-curvature="0" + d="M 1.0390625 1.078125 L 1.0390625 1.6367188 L 1.0390625 3.0546875 L 2.1542969 3.0546875 L 2.1542969 2.1933594 L 3.0253906 2.1933594 L 3.0253906 1.078125 L 1.0390625 1.078125 z M 4.4550781 1.078125 L 4.4550781 2.1933594 L 5.8828125 2.1933594 L 5.8828125 1.078125 L 4.4550781 1.078125 z M 7.3125 1.078125 L 7.3125 2.1933594 L 8.7402344 2.1933594 L 8.7402344 1.078125 L 7.3125 1.078125 z M 10.169922 1.078125 L 10.169922 2.1933594 L 11.599609 2.1933594 L 11.599609 1.078125 L 10.169922 1.078125 z M 13.027344 1.078125 L 13.027344 2.1933594 L 13.898438 2.1933594 L 13.898438 3.0546875 L 15.013672 3.0546875 L 15.013672 1.078125 L 13.027344 1.078125 z M 1.0390625 4.4726562 L 1.0390625 5.890625 L 2.1542969 5.890625 L 2.1542969 4.4726562 L 1.0390625 4.4726562 z M 13.898438 4.4726562 L 13.898438 5.890625 L 15.013672 5.890625 L 15.013672 4.4726562 L 13.898438 4.4726562 z M 1.0390625 7.3105469 L 1.0390625 8.7285156 L 2.1542969 8.7285156 L 2.1542969 7.3105469 L 1.0390625 7.3105469 z M 13.898438 7.3105469 L 13.898438 8.7285156 L 15.013672 8.7285156 L 15.013672 7.3105469 L 13.898438 7.3105469 z M 1.0390625 10.146484 L 1.0390625 11.564453 L 2.1542969 11.564453 L 2.1542969 10.146484 L 1.0390625 10.146484 z M 13.898438 10.146484 L 13.898438 11.564453 L 15.013672 11.564453 L 15.013672 10.146484 L 13.898438 10.146484 z M 1.0390625 12.982422 L 1.0390625 14.958984 L 3.0253906 14.958984 L 3.0253906 13.84375 L 2.1542969 13.84375 L 2.1542969 12.982422 L 1.0390625 12.982422 z M 13.898438 12.982422 L 13.898438 13.84375 L 13.027344 13.84375 L 13.027344 14.958984 L 15.013672 14.958984 L 15.013672 12.982422 L 13.898438 12.982422 z M 4.4550781 13.84375 L 4.4550781 14.958984 L 5.8828125 14.958984 L 5.8828125 13.84375 L 4.4550781 13.84375 z M 7.3125 13.84375 L 7.3125 14.958984 L 8.7402344 14.958984 L 8.7402344 13.84375 L 7.3125 13.84375 z M 10.169922 13.84375 L 10.169922 14.958984 L 11.599609 14.958984 L 11.599609 13.84375 L 10.169922 13.84375 z" + style="opacity:1" + id="path6" /> + <g + id="use5032" + transform="matrix(0.414065,0,0,0.8557123,14.899868,-145.49588)"> + <rect + height="7.017632" + id="rect4895" + style="color:#000000;fill:none;stroke:url(#linearGradient5549);stroke-width:1.67997444;stroke-linejoin:round;stroke-miterlimit:0" + width="16.911819" + x="-25.11964" + y="175.86909" /> + <rect + height="4.678422" + id="rect4897" + style="color:#000000;fill:url(#linearGradient5551);fill-rule:evenodd;stroke:url(#linearGradient5553);stroke-width:1.6799736;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0" + width="12.16012" + x="-22.70454" + y="177.0416" /> + </g> + </g> +</svg> diff --git a/share/icons/hicolor/scalable/actions/align-sel-as-group.svg b/share/icons/hicolor/scalable/actions/align-sel-as-group.svg new file mode 100644 index 000000000..63974dfac --- /dev/null +++ b/share/icons/hicolor/scalable/actions/align-sel-as-group.svg @@ -0,0 +1,247 @@ +<?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:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="svg1" + width="24.019914" + height="24.000294" + version="1.1" + sodipodi:docname="align-sel-as-group.svg" + inkscape:version="0.92.4 (unknown)"> + <metadata + id="metadata41"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + id="base" + showgrid="true" + inkscape:zoom="26.874671" + inkscape:cx="12.121433" + inkscape:cy="12.000147" + inkscape:current-layer="svg1"> + <inkscape:grid + id="GridFromPre046Settings" + type="xygrid" + originx="0pt" + originy="0pt" + spacingx="1pt" + spacingy="1pt" + color="#3f3fff" + empcolor="#3f3fff" + opacity="0.15" + empopacity="0.38" + empspacing="5" /> + </sodipodi:namedview> + <defs + id="defs3"> + <linearGradient + gradientTransform="matrix(1.373757,0,0,0.715969,-52.92573,45.42126)" + gradientUnits="userSpaceOnUse" + id="linearGradient5537" + inkscape:collect="always" + x1="10.04167" + x2="14.01084" + xlink:href="#linearGradient5704" + y1="203.3658" + y2="209.2774" /> + <linearGradient + gradientTransform="matrix(2.026443,0,0,1.557511,-54.13118,-158.6166)" + gradientUnits="userSpaceOnUse" + id="linearGradient5551" + inkscape:collect="always" + x1="18.50864" + x2="17.15024" + xlink:href="#linearGradient5740" + y1="218.8883" + y2="214.5512" /> + <linearGradient + gradientTransform="matrix(2.114324,0,0,1.002646,-47.33758,-30.1841)" + gradientUnits="userSpaceOnUse" + id="linearGradient5549" + inkscape:collect="always" + x1="10.04167" + x2="14.01084" + xlink:href="#linearGradient5704" + y1="203.3658" + y2="209.2774" /> + <linearGradient + id="linearGradient5704"> + <stop + id="stop5706" + offset="0" + style="stop-color:#5a5a5a;stop-opacity:1" /> + <stop + id="stop5708" + offset="1" + style="stop-color:#000000;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient5740"> + <stop + id="stop5742" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop5744" + offset="1" + style="stop-color:#98b6d3;stop-opacity:1" /> + </linearGradient> + <linearGradient + gradientTransform="matrix(2.499161,0,0,1.671823,-82.24308,-178.7565)" + gradientUnits="userSpaceOnUse" + id="linearGradient5545" + inkscape:collect="always" + x1="18.84686" + x2="17.75236" + xlink:href="#linearGradient5740" + y1="218.9795" + y2="215.2099" /> + <linearGradient + gradientTransform="matrix(1.157292,0,0,0.59969,-54.4347,64.92824)" + gradientUnits="userSpaceOnUse" + id="linearGradient5541" + inkscape:collect="always" + x1="15.74156" + x2="17.94699" + xlink:href="#linearGradient5740" + y1="213.872" + y2="219.6793" /> + <linearGradient + gradientTransform="matrix(1.88093,0,0,1.001693,-70.83858,-33.32392)" + gradientUnits="userSpaceOnUse" + id="linearGradient5547" + inkscape:collect="always" + x1="16.04734" + x2="17.31054" + xlink:href="#linearGradient5740" + y1="213.2164" + y2="217.8234" /> + <linearGradient + gradientTransform="matrix(1.537676,0,0,1.000883,-61.45158,-22.13894)" + gradientUnits="userSpaceOnUse" + id="linearGradient5539" + inkscape:collect="always" + x1="20.21689" + x2="18.82314" + xlink:href="#linearGradient5740" + y1="219.9305" + y2="214.6554" /> + <linearGradient + gradientTransform="matrix(1.525151,0,0,0.933201,-44.88385,-23.1282)" + gradientUnits="userSpaceOnUse" + id="linearGradient5553" + inkscape:collect="always" + x1="15.74156" + x2="19.38252" + xlink:href="#linearGradient5740" + y1="213.872" + y2="219.4184" /> + <linearGradient + gradientTransform="matrix(2.125329,0,0,1.002646,-66.82105,-25.5096)" + gradientUnits="userSpaceOnUse" + id="linearGradient5543" + inkscape:collect="always" + x1="10.04167" + x2="14.01084" + xlink:href="#linearGradient5704" + y1="203.3658" + y2="209.2774" /> + <linearGradient + id="linearGradient6684"> + <stop + id="stop6686" + offset="0" + style="stop-color:#ffbf00;stop-opacity:1" /> + <stop + id="stop6688" + offset="1" + style="stop-color:#ffffff;stop-opacity:1" /> + </linearGradient> + </defs> + <rect + y="0.0016714404" + x="1.4978042" + width="16" + style="color:#000000;fill:none" + id="rect5073" + height="15.9681" /> + <g + transform="matrix(1,0,0,0.998006,48.50487,-174.66945)" + id="use5030"> + <rect + y="180.54359" + x="-44.487461" + width="16.99984" + style="color:#000000;fill:none;stroke:url(#linearGradient5543);stroke-width:1.00099862;stroke-linejoin:round;stroke-miterlimit:0" + id="rect4879" + height="7.017632" /> + <rect + y="181.53729" + x="-43.485401" + width="14.99677" + style="color:#000000;fill:url(#linearGradient5545);fill-rule:evenodd;stroke:url(#linearGradient5547);stroke-width:1.00099921;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0" + id="rect4881" + height="5.0217919" /> + </g> + <g + transform="matrix(0.414065,0,0,0.8557123,19.197249,-140.83309)" + id="use5032"> + <rect + y="175.86909" + x="-25.11964" + width="16.911819" + style="color:#000000;fill:none;stroke:url(#linearGradient5549);stroke-width:1.67997444;stroke-linejoin:round;stroke-miterlimit:0" + id="rect4895" + height="7.017632" /> + <rect + y="177.0416" + x="-22.70454" + width="12.16012" + style="color:#000000;fill:url(#linearGradient5551);fill-rule:evenodd;stroke:url(#linearGradient5553);stroke-width:1.6799736;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0" + id="rect4897" + height="4.678422" /> + </g> + <g + transform="matrix(1.091916,0,0,0.998006,49.817293,-176.175)" + id="use5034"> + <rect + y="192.55969" + x="-38.489891" + width="10.98825" + style="color:#000000;fill:none;stroke:url(#linearGradient5537);stroke-width:0.95794243;stroke-linejoin:round;stroke-miterlimit:0" + id="rect4911" + height="5.011148" /> + <rect + y="193.56081" + x="-37.604919" + width="9.2271681" + style="color:#000000;fill:url(#linearGradient5539);fill-rule:evenodd;stroke:url(#linearGradient5541);stroke-width:0.95794243;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0" + id="rect4913" + height="3.0064349" /> + </g> + <path + style="fill:none;stroke:#c80000;stroke-width:1.00000036;stroke-linecap:square" + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="use5046" + d="M 3.0918664,0.57606848 V 23.575217" /> + <path + d="M 22.02211,0.50164896 V 23.500797" + id="path862" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" + style="fill:none;stroke:#c80000;stroke-width:1.00000036;stroke-linecap:square" /> +</svg> diff --git a/share/icons/hicolor/symbolic/actions/align-on-canvas.svg b/share/icons/hicolor/symbolic/actions/align-on-canvas.svg new file mode 100644 index 000000000..121afc7fc --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/align-on-canvas.svg @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) and export_objects.py --> + +<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="svg1" + width="16" + height="16" + viewBox="0 0 16 16" + sodipodi:docname="align-on-canvas.svg" + inkscape:version="0.92.4 (unknown)"> + <defs + id="defs10" /> + <sodipodi:namedview + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + id="namedview" + showgrid="true" + inkscape:zoom="27.166187" + inkscape:cx="-1.3875431" + inkscape:cy="8.9906751" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:current-layer="layercompo"> + <inkscape:grid + type="xygrid" + id="grid" /> + </sodipodi:namedview> + <metadata + id="metadata1906"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <cc:license + rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" /> + <dc:title>LiveEffect Icons proposal</dc:title> + <dc:date>13 Jan 2019</dc:date> + <dc:creator> + <cc:Agent> + <dc:title>Ramón Miranda</dc:title> + </cc:Agent> + </dc:creator> + <dc:rights> + <cc:Agent> + <dc:title>see the license tab</dc:title> + </cc:Agent> + </dc:rights> + <dc:subject> + <rdf:Bag> + <rdf:li>icon ui</rdf:li> + </rdf:Bag> + </dc:subject> + <dc:description>This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI)</dc:description> + <dc:publisher> + <cc:Agent> + <dc:title /> + </cc:Agent> + </dc:publisher> + <dc:identifier /> + <dc:source /> + <dc:relation /> + <dc:language>-</dc:language> + <dc:coverage /> + <dc:contributor> + <cc:Agent> + <dc:title>Ramon Miranda +Jabier Arraiza</dc:title> + </cc:Agent> + </dc:contributor> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/publicdomain/zero/1.0/"> + <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> + <g + inkscape:groupmode="layer" + id="layercompo" + inkscape:label="dashed-stroke"> + <path + id="rect22048" + d="M 0,0 H 16 V 16 H 0 Z" + style="opacity:0;fill:none" /> + <path + inkscape:connector-curvature="0" + d="M 1.0390625 1.078125 L 1.0390625 1.6367188 L 1.0390625 3.0546875 L 2.1542969 3.0546875 L 2.1542969 2.1933594 L 3.0253906 2.1933594 L 3.0253906 1.078125 L 1.0390625 1.078125 z M 4.4550781 1.078125 L 4.4550781 2.1933594 L 5.8828125 2.1933594 L 5.8828125 1.078125 L 4.4550781 1.078125 z M 7.3125 1.078125 L 7.3125 2.1933594 L 8.7402344 2.1933594 L 8.7402344 1.078125 L 7.3125 1.078125 z M 10.169922 1.078125 L 10.169922 2.1933594 L 11.599609 2.1933594 L 11.599609 1.078125 L 10.169922 1.078125 z M 13.027344 1.078125 L 13.027344 2.1933594 L 13.898438 2.1933594 L 13.898438 3.0546875 L 15.013672 3.0546875 L 15.013672 1.078125 L 13.027344 1.078125 z M 1.0390625 4.4726562 L 1.0390625 5.890625 L 2.1542969 5.890625 L 2.1542969 4.4726562 L 1.0390625 4.4726562 z M 13.898438 4.4726562 L 13.898438 5.890625 L 15.013672 5.890625 L 15.013672 4.4726562 L 13.898438 4.4726562 z M 1.0390625 7.3105469 L 1.0390625 8.7285156 L 2.1542969 8.7285156 L 2.1542969 7.3105469 L 1.0390625 7.3105469 z M 13.898438 7.3105469 L 13.898438 8.7285156 L 15.013672 8.7285156 L 15.013672 7.3105469 L 13.898438 7.3105469 z M 1.0390625 10.146484 L 1.0390625 11.564453 L 2.1542969 11.564453 L 2.1542969 10.146484 L 1.0390625 10.146484 z M 13.898438 10.146484 L 13.898438 11.564453 L 15.013672 11.564453 L 15.013672 10.146484 L 13.898438 10.146484 z M 1.0390625 12.982422 L 1.0390625 14.958984 L 3.0253906 14.958984 L 3.0253906 13.84375 L 2.1542969 13.84375 L 2.1542969 12.982422 L 1.0390625 12.982422 z M 13.898438 12.982422 L 13.898438 13.84375 L 13.027344 13.84375 L 13.027344 14.958984 L 15.013672 14.958984 L 15.013672 12.982422 L 13.898438 12.982422 z M 4.4550781 13.84375 L 4.4550781 14.958984 L 5.8828125 14.958984 L 5.8828125 13.84375 L 4.4550781 13.84375 z M 7.3125 13.84375 L 7.3125 14.958984 L 8.7402344 14.958984 L 8.7402344 13.84375 L 7.3125 13.84375 z M 10.169922 13.84375 L 10.169922 14.958984 L 11.599609 14.958984 L 11.599609 13.84375 L 10.169922 13.84375 z" + style="opacity:1" + id="path6" /> + <path + inkscape:connector-curvature="0" + id="rect22036" + d="M -15.767012,-0.42960155 H 0.232996 V 15.570406 H -15.767012 Z" + style="opacity:0;fill:none;stroke-width:0.66666698" /> + <path + inkscape:connector-curvature="0" + id="rect22038" + d="M 4.9999984,4.9999878 H 11.000001 V 10.999984 H 4.9999984 Z" + style="opacity:1;stroke-width:0.66666698" /> + </g> +</svg> diff --git a/share/icons/hicolor/symbolic/actions/align-sel-as-group.svg b/share/icons/hicolor/symbolic/actions/align-sel-as-group.svg new file mode 100644 index 000000000..75565ee99 --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/align-sel-as-group.svg @@ -0,0 +1,120 @@ +<?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" + id="svg1" + width="24.019914" + height="24.000294" + version="1.1" + sodipodi:docname="align-sel-as-group.svg" + inkscape:version="0.92.4 (unknown)"> + <metadata + id="metadata41"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + id="base" + showgrid="true" + inkscape:zoom="26.874671" + inkscape:cx="12.121433" + inkscape:cy="12.000147" + inkscape:current-layer="svg1"> + <inkscape:grid + id="GridFromPre046Settings" + type="xygrid" + originx="0pt" + originy="0pt" + spacingx="1pt" + spacingy="1pt" + color="#3f3fff" + empcolor="#3f3fff" + opacity="0.15" + empopacity="0.38" + empspacing="5" /> + </sodipodi:namedview> + <defs + id="defs3"> + <linearGradient + id="linearGradient5704"> + <stop + id="stop5706" + offset="0" + style="stop-color:#5a5a5a;stop-opacity:1" /> + <stop + id="stop5708" + offset="1" + style="stop-color:#000000;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient5740"> + <stop + id="stop5742" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop5744" + offset="1" + style="stop-color:#98b6d3;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient6684"> + <stop + id="stop6686" + offset="0" + style="stop-color:#ffbf00;stop-opacity:1" /> + <stop + id="stop6688" + offset="1" + style="stop-color:#ffffff;stop-opacity:1" /> + </linearGradient> + </defs> + <rect + y="0.0016714404" + x="1.4978042" + width="16" + style="color:#000000;fill:none" + id="rect5073" + height="15.9681" /> + <path + inkscape:connector-curvature="0" + id="rect22036" + d="M 0.66664548,0.66696058 H 23.999978 V 24.000293 H 0.66664548 Z" + style="opacity:0;fill:none;stroke-width:0.66666698" /> + <path + inkscape:connector-curvature="0" + id="rect22040" + d="M 20.361111,2.6669605 H 21.333333 V 21.333627 H 20.361111 Z" + style="opacity:1;stroke-width:0.66666698" /> + <path + inkscape:connector-curvature="0" + id="rect22042" + d="M 9.3333327,4.0002937 H 18.666667 V 8.8614045 H 9.3333327 Z" + style="opacity:1;stroke-width:0.66666698" /> + <path + inkscape:connector-curvature="0" + id="rect22044" + d="M 7.472201,11.750283 H 16 V 14.66696 H 7.472201 Z" + style="opacity:1;stroke-width:0.66666698" /> + <path + inkscape:connector-curvature="0" + id="rect22046" + d="M 5.3333333,17.444738 H 15.083355 V 21.333627 H 5.3333333 Z" + style="opacity:1;stroke-width:0.66666698" /> + <path + style="opacity:1;stroke-width:0.66666698" + d="M 2.6666667,2.6669605 H 3.6388887 V 21.333627 H 2.6666667 Z" + id="path64" + inkscape:connector-curvature="0" /> +</svg> diff --git a/src/seltrans.cpp b/src/seltrans.cpp index f43ce3f76..235c29c65 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -223,9 +223,12 @@ void Inkscape::SelTrans::resetState() void Inkscape::SelTrans::increaseState() { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + bool show_align = prefs->getBool("/dialogs/align/oncanvas", false); + if (_state == STATE_SCALE) { _state = STATE_ROTATE; - } else if (_state == STATE_ROTATE) { + } else if (_state == STATE_ROTATE && show_align) { _state = STATE_ALIGN; } else { _state = STATE_SCALE; diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp index d62ca3ea7..c112f965d 100644 --- a/src/ui/dialog/align-and-distribute.cpp +++ b/src/ui/dialog/align-and-distribute.cpp @@ -938,8 +938,7 @@ AlignAndDistribute::AlignAndDistribute() _removeOverlapTable(), _nodesTable(), _anchorLabel(_("Relative to: ")), - _anchorLabelNode(_("Relative to: ")), - _selgrpLabel(_("_Treat selection as group: "), true) + _anchorLabelNode(_("Relative to: ")) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -1085,17 +1084,30 @@ AlignAndDistribute::AlignAndDistribute() _comboNode.set_active(prefs->getInt("/dialogs/align/align-nodes-to", 2)); _comboNode.signal_changed().connect(sigc::mem_fun(*this, &AlignAndDistribute::on_node_ref_change)); + Gtk::Image* selgrp_icon = Gtk::manage(new Gtk::Image()); + selgrp_icon = sp_get_icon_image("align-sel-as-group", Gtk::ICON_SIZE_LARGE_TOOLBAR); + _selgrp.add(*selgrp_icon); + + _selgrp.set_active(prefs->getBool("/dialogs/align/sel-as-groups")); + _selgrp.set_relief(Gtk::RELIEF_NONE); + _selgrp.set_tooltip_text(_("Treat selection as group")); + _selgrp.signal_toggled().connect(sigc::mem_fun(*this, &AlignAndDistribute::on_selgrp_toggled)); + _anchorBox.pack_end(_selgrp, false, false); _anchorBox.pack_end(_combo, false, false); _anchorBox.pack_end(_anchorLabel, false, false); _anchorBoxNode.pack_end(_comboNode, false, false); _anchorBoxNode.pack_end(_anchorLabelNode, false, false); - _selgrpLabel.set_mnemonic_widget(_selgrp); - _selgrpBox.pack_end(_selgrp, false, false); - _selgrpBox.pack_end(_selgrpLabel, false, false); - _selgrp.set_active(prefs->getBool("/dialogs/align/sel-as-groups")); - _selgrp.signal_toggled().connect(sigc::mem_fun(*this, &AlignAndDistribute::on_selgrp_toggled)); + Gtk::Image* oncanvas_icon = Gtk::manage(new Gtk::Image()); + oncanvas_icon = sp_get_icon_image("align-on-canvas", Gtk::ICON_SIZE_LARGE_TOOLBAR); + _oncanvas.add(*oncanvas_icon); + + _oncanvas.set_relief(Gtk::RELIEF_NONE); + _oncanvas.set_tooltip_text(_("Enable on-canvas alignment handles.")); + _anchorBox.pack_start(_oncanvas, false, false); + _oncanvas.set_active(prefs->getBool("/dialogs/align/oncanvas")); + _oncanvas.signal_toggled().connect(sigc::mem_fun(*this, &AlignAndDistribute::on_oncanvas_toggled)); // Right align the buttons _alignTableBox.pack_end(_alignTable, false, false); @@ -1186,8 +1198,12 @@ void AlignAndDistribute::on_selgrp_toggled(){ //Make blink the master } +void AlignAndDistribute::on_oncanvas_toggled(){ + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setInt("/dialogs/align/oncanvas", _oncanvas.get_active()); - + //Make blink the master +} void AlignAndDistribute::setMode(bool nodeEdit) { diff --git a/src/ui/dialog/align-and-distribute.h b/src/ui/dialog/align-and-distribute.h index ad23530ec..175ebdc21 100644 --- a/src/ui/dialog/align-and-distribute.h +++ b/src/ui/dialog/align-and-distribute.h @@ -63,6 +63,7 @@ protected: void on_ref_change(); void on_node_ref_change(); void on_selgrp_toggled(); + void on_oncanvas_toggled(); void addDistributeButton(const Glib::ustring &id, const Glib::ustring tiptext, guint row, guint col, bool onInterSpace, Geom::Dim2 orientation, float kBegin, float kEnd); @@ -107,8 +108,8 @@ protected: Gtk::HBox _nodesTableBox; Gtk::Label _anchorLabel; Gtk::Label _anchorLabelNode; - Gtk::Label _selgrpLabel; - Gtk::CheckButton _selgrp; + Gtk::ToggleButton _selgrp; + Gtk::ToggleButton _oncanvas; Gtk::ComboBoxText _combo; Gtk::HBox _anchorBoxNode; Gtk::ComboBoxText _comboNode; |
