Code

Really fix node alignment icons; add clarifying comment to source.
authortweenk <tweenk@users.sourceforge.net>
Mon, 13 Apr 2009 23:42:51 +0000 (23:42 +0000)
committertweenk <tweenk@users.sourceforge.net>
Mon, 13 Apr 2009 23:42:51 +0000 (23:42 +0000)
share/icons/hicolor/16x16/actions/align-horizontal-node.png
share/icons/hicolor/16x16/actions/align-vertical-node.png
share/icons/hicolor/24x24/actions/align-horizontal-node.png
share/icons/hicolor/24x24/actions/align-vertical-node.png
share/icons/hicolor/scalable/actions/align-horizontal-node.svg
share/icons/hicolor/scalable/actions/align-vertical-node.svg
src/ui/dialog/align-and-distribute.cpp

index 173fd183024977597c06ecf3be368e85d0c12e6e..8b82d9262d35112c7f583e30ea428c6a1b1ba43e 100644 (file)
Binary files a/share/icons/hicolor/16x16/actions/align-horizontal-node.png and b/share/icons/hicolor/16x16/actions/align-horizontal-node.png differ
index 8b82d9262d35112c7f583e30ea428c6a1b1ba43e..173fd183024977597c06ecf3be368e85d0c12e6e 100644 (file)
Binary files a/share/icons/hicolor/16x16/actions/align-vertical-node.png and b/share/icons/hicolor/16x16/actions/align-vertical-node.png differ
index 8aa9ba36e3b955c8eb3017b146770b5531859a8d..303fb06aa88b4ce7ab9d0d4ad1586a8d36ca52a7 100644 (file)
Binary files a/share/icons/hicolor/24x24/actions/align-horizontal-node.png and b/share/icons/hicolor/24x24/actions/align-horizontal-node.png differ
index 303fb06aa88b4ce7ab9d0d4ad1586a8d36ca52a7..8aa9ba36e3b955c8eb3017b146770b5531859a8d 100644 (file)
Binary files a/share/icons/hicolor/24x24/actions/align-vertical-node.png and b/share/icons/hicolor/24x24/actions/align-vertical-node.png differ
index df4980b1755a0a53cb7ba9053f879bc69f048632..7c37e153305a5a2d56702b4297469a132687867b 100644 (file)
@@ -6,6 +6,7 @@
    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"
    width="48px"
@@ -13,7 +14,7 @@
    id="svg12119"
    sodipodi:version="0.32"
    inkscape:version="0.46+devel r20659"
-   sodipodi:docname="node-align-vertical.svg"
+   sodipodi:docname="node-align-horizontal.svg"
    inkscape:output_extension="org.inkscape.output.svg.inkscape">
   <defs
      id="defs12121" />
      inkscape:label="Layer 1"
      inkscape:groupmode="layer">
     <g
-       id="node_halign"
-       transform="matrix(1.9995416,0,0,1.9995416,-2349.4554,-279.93061)"
-       inkscape:label="#node_halign">
+       id="node_valign"
+       inkscape:label="#node_valign"
+       transform="matrix(1.9995417,0,0,1.9995417,-2349.4501,-279.92484)">
       <path
          style="fill:none;stroke:#c80000;stroke-width:1.00000036;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
-         d="m 1175.498,152.4972 22.999,0 0,0"
-         id="path5318" />
-      <rect
-         y="1180.4969"
-         x="-163.9971"
-         height="16"
-         width="16"
-         id="rect5320"
-         style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;display:inline"
-         transform="matrix(0,-1,1,0,0,0)" />
+         d="m 1186.5,140.5008 0,22.9992 0,0"
+         id="path5262" />
       <path
-         style="fill:none;stroke:#969696;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none"
-         d="m 1175.497,163.4972 c 3.5,-3 1.599,-18.9753 7.5,-17.5 4,1 1,17 8.5,17.5 5.488,0.3658 2.5,-17 6.5,-23"
-         id="path5322"
+         style="fill:none;stroke:#969696;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none"
+         d="m 1175.5,140.5 c 3,3.5 18.975,1.5988 17.5,7.5 -1,4 -17,1 -17.5,8.5 -0.366,5.4878 17,2.5 23,6.5"
+         id="path5249"
          sodipodi:nodetypes="cssc" />
       <rect
-         style="color:#000000;fill:#8ab3de;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline"
-         id="use5452"
-         width="4.0662079"
+         y="141.5"
+         x="1184.5"
          height="4.0071669"
-         x="1176.5219"
-         y="150.50909" />
-      <rect
-         style="color:#000000;fill:#8ab3de;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline"
-         id="use5455"
          width="4.0662079"
-         height="4.0071669"
-         x="1183.5219"
-         y="150.50192" />
-      <rect
-         style="color:#000000;fill:#8ab3de;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline"
-         id="use5457"
-         width="4.0662079"
-         height="4.0071669"
-         x="1193.4556"
-         y="150.50192" />
+         id="rect5251"
+         style="color:#000000;fill:#8ab3de;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline" />
+      <use
+         x="0"
+         y="0"
+         xlink:href="#rect5251"
+         id="use5438"
+         transform="translate(0.0188999,6.991948)"
+         width="1250"
+         height="1250" />
+      <use
+         x="0"
+         y="0"
+         xlink:href="#rect5251"
+         id="use5440"
+         transform="translate(-0.0473082,16.99195)"
+         width="1250"
+         height="1250" />
     </g>
   </g>
 </svg>
index 7c37e153305a5a2d56702b4297469a132687867b..df4980b1755a0a53cb7ba9053f879bc69f048632 100644 (file)
@@ -6,7 +6,6 @@
    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"
    width="48px"
@@ -14,7 +13,7 @@
    id="svg12119"
    sodipodi:version="0.32"
    inkscape:version="0.46+devel r20659"
-   sodipodi:docname="node-align-horizontal.svg"
+   sodipodi:docname="node-align-vertical.svg"
    inkscape:output_extension="org.inkscape.output.svg.inkscape">
   <defs
      id="defs12121" />
      inkscape:label="Layer 1"
      inkscape:groupmode="layer">
     <g
-       id="node_valign"
-       inkscape:label="#node_valign"
-       transform="matrix(1.9995417,0,0,1.9995417,-2349.4501,-279.92484)">
+       id="node_halign"
+       transform="matrix(1.9995416,0,0,1.9995416,-2349.4554,-279.93061)"
+       inkscape:label="#node_halign">
       <path
          style="fill:none;stroke:#c80000;stroke-width:1.00000036;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
-         d="m 1186.5,140.5008 0,22.9992 0,0"
-         id="path5262" />
+         d="m 1175.498,152.4972 22.999,0 0,0"
+         id="path5318" />
+      <rect
+         y="1180.4969"
+         x="-163.9971"
+         height="16"
+         width="16"
+         id="rect5320"
+         style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;display:inline"
+         transform="matrix(0,-1,1,0,0,0)" />
       <path
-         style="fill:none;stroke:#969696;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none"
-         d="m 1175.5,140.5 c 3,3.5 18.975,1.5988 17.5,7.5 -1,4 -17,1 -17.5,8.5 -0.366,5.4878 17,2.5 23,6.5"
-         id="path5249"
+         style="fill:none;stroke:#969696;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none"
+         d="m 1175.497,163.4972 c 3.5,-3 1.599,-18.9753 7.5,-17.5 4,1 1,17 8.5,17.5 5.488,0.3658 2.5,-17 6.5,-23"
+         id="path5322"
          sodipodi:nodetypes="cssc" />
       <rect
-         y="141.5"
-         x="1184.5"
+         style="color:#000000;fill:#8ab3de;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline"
+         id="use5452"
+         width="4.0662079"
          height="4.0071669"
+         x="1176.5219"
+         y="150.50909" />
+      <rect
+         style="color:#000000;fill:#8ab3de;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline"
+         id="use5455"
          width="4.0662079"
-         id="rect5251"
-         style="color:#000000;fill:#8ab3de;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline" />
-      <use
-         x="0"
-         y="0"
-         xlink:href="#rect5251"
-         id="use5438"
-         transform="translate(0.0188999,6.991948)"
-         width="1250"
-         height="1250" />
-      <use
-         x="0"
-         y="0"
-         xlink:href="#rect5251"
-         id="use5440"
-         transform="translate(-0.0473082,16.99195)"
-         width="1250"
-         height="1250" />
+         height="4.0071669"
+         x="1183.5219"
+         y="150.50192" />
+      <rect
+         style="color:#000000;fill:#8ab3de;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline"
+         id="use5457"
+         width="4.0662079"
+         height="4.0071669"
+         x="1193.4556"
+         y="150.50192" />
     </g>
   </g>
 </svg>
index 09fe89cff22b209d7b94c66d7551c38adc7710f5..a39a096284cdfef41d860203c79c2ed5e51e4353 100644 (file)
@@ -892,12 +892,15 @@ AlignAndDistribute::AlignAndDistribute()
                             0, 0);
 
     //Node Mode buttons
+    // NOTE: "align nodes vertically" means "move nodes vertically until they align on a common
+    // _horizontal_ line". This is analogous to what the "align-vertical-center" means.
+    // There is no doubt some ambiguity. For this reason the descriptions are different.
     addNodeButton(INKSCAPE_ICON_ALIGN_HORIZONTAL_NODES,
-                  _("Align selected nodes horizontally"),
-                  0, Geom::X, false);
+                  _("Align selected nodes to a common vertical line"),
+                  0, Geom::Y, false);
     addNodeButton(INKSCAPE_ICON_ALIGN_VERTICAL_NODES,
-                  _("Align selected nodes vertically"),
-                  1, Geom::Y, false);
+                  _("Align selected nodes to a common horizontal line"),
+                  1, Geom::X, false);
     addNodeButton(INKSCAPE_ICON_DISTRIBUTE_HORIZONTAL_NODE,
                   _("Distribute selected nodes horizontally"),
                   2, Geom::X, true);