Commits

Angel Ezquerra committed 36e5c9d

filelistmodel: mark added and removed subrepos with an icon overlay

We introduce the new 'thg-added-subrepo' and 'thg-removed-subrepo' svg icons.
When a subrepo is added or removed (respectively) we overlay the corresponding
icon on top of the regular subrepo type icons (hg, git, svn) instead of the
existing 'thg-subrepo' svg icon.

These new icons are the result of mixing the existing thg-subrepo icon and the
existing 'add' and 'remove' icons. Because the 'add' icon is blue, the
'thg-add-subrepo' overlay is less visible than it could be (although it can be
recognized fine). It would be best if we changed the add icons to a green
color, which would match the "added file color" on the status file list, and
would be more visible. If we did we would also need to change the fileadd icon
to be consistent. That is left for another revision.

  • Participants
  • Parent commits 17aa84f

Comments (0)

Files changed (3)

File icons/scalable/status/thg-added-subrepo.svg

+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<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"
+   height="256"
+   id="svg2"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="thg-added-subrepo.svg"
+   sodipodi:version="0.32"
+   version="1.0"
+   width="256">
+  <metadata
+     id="metadata3">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:title></dc:title>
+        <dc:description />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>unsorted</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:publisher>
+          <cc:Agent
+             rdf:about="http://www.openclipart.org/">
+            <dc:title>Open Clip Art Library, Source: Wiki Commons, Source: Wikimedia Commons</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:rights>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:rights>
+        <dc:date />
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <cc:license
+           rdf:resource="GPL" />
+        <dc:language>en</dc:language>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs22">
+    <inkscape:perspective
+       id="perspective26"
+       inkscape:persp3d-origin="35.5 : 8.6666667 : 1"
+       inkscape:vp_x="0 : 13 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="71 : 13 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient6551"
+       id="linearGradient6557"
+       x1="55.080357"
+       y1="110.15236"
+       x2="73.14286"
+       y2="110.15236"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.00344154,1.2102096,-1.6263159,0.18275943,243.22716,8.6686994)" />
+    <linearGradient
+       id="linearGradient6551">
+      <stop
+         style="stop-color:#f2f53a;stop-opacity:1;"
+         offset="0"
+         id="stop6553" />
+      <stop
+         style="stop-color:#fdff8e;stop-opacity:0;"
+         offset="1"
+         id="stop6555" />
+    </linearGradient>
+    <linearGradient
+       y2="110.15236"
+       x2="73.14286"
+       y1="110.15236"
+       x1="55.080357"
+       gradientTransform="matrix(0.00344154,1.2102096,-1.6263159,0.18275943,309.0051,57.366183)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3022"
+       xlink:href="#linearGradient6551"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient6551"
+       id="linearGradient3848"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.00344154,1.2102096,-1.6263159,0.18275943,309.0051,57.366183)"
+       x1="55.080357"
+       y1="110.15236"
+       x2="73.14286"
+       y2="110.15236" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3897"
+       id="linearGradient3903"
+       x1="68.64286"
+       y1="112.43361"
+       x2="61.142857"
+       y2="104.93361"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.25,0,0,1.25,-22.315715,-33.203405)" />
+    <linearGradient
+       id="linearGradient3897">
+      <stop
+         style="stop-color:#29b736;stop-opacity:1;"
+         offset="0"
+         id="stop3899" />
+      <stop
+         style="stop-color:#87db93;stop-opacity:0.99130434;"
+         offset="1"
+         id="stop3901" />
+    </linearGradient>
+    <linearGradient
+       y2="104.93361"
+       x2="61.142857"
+       y1="112.43361"
+       x1="68.64286"
+       gradientTransform="matrix(11,0,0,11,-548.40691,-1109.418)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient4706"
+       xlink:href="#linearGradient3897"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3897-7"
+       id="linearGradient3903-1"
+       x1="68.64286"
+       y1="112.43361"
+       x2="61.142857"
+       y2="104.93361"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2,0,0,2,-65.142857,-108.93361)" />
+    <linearGradient
+       id="linearGradient3897-7">
+      <stop
+         style="stop-color:#427fbf;stop-opacity:1;"
+         offset="0"
+         id="stop3899-4" />
+      <stop
+         style="stop-color:#a6c2e1;stop-opacity:0.99130434;"
+         offset="1"
+         id="stop3901-0" />
+    </linearGradient>
+    <linearGradient
+       y2="104.93361"
+       x2="61.142857"
+       y1="112.43361"
+       x1="68.64286"
+       gradientTransform="matrix(11.01474,0,0,11.01474,-548.35088,-1111.5318)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient5276"
+       xlink:href="#linearGradient3897-7"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10.0"
+     guidetolerance="10.0"
+     id="base"
+     inkscape:current-layer="svg2"
+     inkscape:cx="78.633263"
+     inkscape:cy="122.43398"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:window-height="738"
+     inkscape:window-width="1280"
+     inkscape:window-x="-8"
+     inkscape:window-y="-8"
+     inkscape:zoom="1.9683098"
+     objecttolerance="10.0"
+     pagecolor="#ffffff"
+     showgrid="false"
+     inkscape:window-maximized="1" />
+  <path
+     style="color:#000000;fill:#fff08b;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:6.1813693;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+     d="m 125.93864,98.872518 c -0.009,-0.685743 -0.68406,-1.277866 -1.42388,-1.248212 l -15.76003,0.630734 -56.285668,2.25282 -45.5914241,1.82489 c -1.0459723,0.0424 -1.9589962,0.93548 -1.9465597,1.90518 l 1.7798561,138.8014 c 0.012437,0.96977 0.947448,1.78948 1.9934245,1.74752 L 110.58138,240.70913 c 1.046,-0.0402 1.95917,-0.93553 1.94667,-1.90515 l -0.98024,-76.44525 13.78995,-0.55375 c 0.74031,-0.0302 1.39924,-0.67454 1.39041,-1.3607 l -0.78971,-61.573643 z"
+     id="rect2995"
+     inkscape:connector-curvature="0" />
+  <path
+     id="path2900-9"
+     style="fill:url(#linearGradient5276);fill-opacity:1;fill-rule:evenodd;stroke:#204a87;stroke-width:11.54344749;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+     d="m 141.64382,5.7329236 55.07371,0 0,55.0736964 55.07369,0 0,55.07372 -55.07369,0 0,55.07366 -55.07371,0 0,-55.07366 -55.073685,0 0,-55.07372 55.073685,0 0,-55.0736964 z"
+     sodipodi:nodetypes="ccccccccccccc"
+     inkscape:connector-curvature="0" />
+  <path
+     style="color:#000000;fill:#fff08b;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:6.90631437;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+     d="m 126.53106,174.8151 c -0.002,-0.73164 -0.68305,-1.31092 -1.58265,-1.35089 l -18.6286,-0.81954 -0.18942,-62.78471 c -0.002,-0.674 -0.75201,-1.31432 -1.58251,-1.35078 L 7.3000652,104.2305 c -0.8291401,-0.0366 -1.5767724,0.53831 -1.5747635,1.21186 l 0.4190185,138.89489 c 0.00201,0.67395 0.7526549,1.31425 1.5825125,1.35078 l 70.7257353,3.11177 c 0.209509,0.54277 0.538841,1.0484 1.265881,1.08068 l 45.466451,2.00049 c 0.89981,0.0402 1.57713,-0.48056 1.5749,-1.21195 l -0.22887,-75.85389 z"
+     id="rect3043"
+     inkscape:connector-curvature="0" />
+  <text
+     xml:space="preserve"
+     style="font-size:142.12782288px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000080;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial Bold"
+     x="12.382761"
+     y="221.77342"
+     id="text3821"
+     sodipodi:linespacing="125%"
+     transform="scale(0.9640397,1.0373017)"><tspan
+       sodipodi:role="line"
+       id="tspan3823"
+       x="12.382761"
+       y="221.77342">S</tspan></text>
+</svg>

File icons/scalable/status/thg-removed-subrepo.svg

+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<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"
+   height="256"
+   id="svg2"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="thg-removed-subrepo2.svg"
+   sodipodi:version="0.32"
+   version="1.0"
+   width="256">
+  <metadata
+     id="metadata3">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:title></dc:title>
+        <dc:description />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>unsorted</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:publisher>
+          <cc:Agent
+             rdf:about="http://www.openclipart.org/">
+            <dc:title>Open Clip Art Library, Source: Wiki Commons, Source: Wikimedia Commons</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:rights>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:rights>
+        <dc:date />
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <cc:license
+           rdf:resource="GPL" />
+        <dc:language>en</dc:language>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs22">
+    <inkscape:perspective
+       id="perspective26"
+       inkscape:persp3d-origin="35.5 : 8.6666667 : 1"
+       inkscape:vp_x="0 : 13 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="71 : 13 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient6551"
+       id="linearGradient6557"
+       x1="55.080357"
+       y1="110.15236"
+       x2="73.14286"
+       y2="110.15236"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.00344154,1.2102096,-1.6263159,0.18275943,243.22716,8.6686994)" />
+    <linearGradient
+       id="linearGradient6551">
+      <stop
+         style="stop-color:#f2f53a;stop-opacity:1;"
+         offset="0"
+         id="stop6553" />
+      <stop
+         style="stop-color:#fdff8e;stop-opacity:0;"
+         offset="1"
+         id="stop6555" />
+    </linearGradient>
+    <linearGradient
+       y2="110.15236"
+       x2="73.14286"
+       y1="110.15236"
+       x1="55.080357"
+       gradientTransform="matrix(0.00344154,1.2102096,-1.6263159,0.18275943,309.0051,57.366183)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3022"
+       xlink:href="#linearGradient6551"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient6551"
+       id="linearGradient3848"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.00344154,1.2102096,-1.6263159,0.18275943,309.0051,57.366183)"
+       x1="55.080357"
+       y1="110.15236"
+       x2="73.14286"
+       y2="110.15236" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3897"
+       id="linearGradient3903"
+       x1="68.64286"
+       y1="112.43361"
+       x2="61.142857"
+       y2="104.93361"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.25,0,0,1.25,-22.315715,-33.203405)" />
+    <linearGradient
+       id="linearGradient3897">
+      <stop
+         style="stop-color:#29b736;stop-opacity:1;"
+         offset="0"
+         id="stop3899" />
+      <stop
+         style="stop-color:#87db93;stop-opacity:0.99130434;"
+         offset="1"
+         id="stop3901" />
+    </linearGradient>
+    <linearGradient
+       y2="104.93361"
+       x2="61.142857"
+       y1="112.43361"
+       x1="68.64286"
+       gradientTransform="matrix(11,0,0,11,-548.40691,-1109.418)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient4706"
+       xlink:href="#linearGradient3897"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3170"
+       id="linearGradient3176"
+       x1="56.50333"
+       y1="99.284218"
+       x2="72.847733"
+       y2="115.6289"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient3170">
+      <stop
+         style="stop-color:#f35656;stop-opacity:1;"
+         offset="0"
+         id="stop3172" />
+      <stop
+         style="stop-color:#e40f0f;stop-opacity:1;"
+         offset="1"
+         id="stop3174" />
+    </linearGradient>
+    <linearGradient
+       y2="115.6289"
+       x2="72.847733"
+       y1="99.284218"
+       x1="56.50333"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient5200"
+       xlink:href="#linearGradient3170"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10.0"
+     guidetolerance="10.0"
+     id="base"
+     inkscape:current-layer="svg2"
+     inkscape:cx="162.96958"
+     inkscape:cy="122.43398"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:window-height="738"
+     inkscape:window-width="1280"
+     inkscape:window-x="-8"
+     inkscape:window-y="-8"
+     inkscape:zoom="1.9683098"
+     objecttolerance="10.0"
+     pagecolor="#ffffff"
+     showgrid="false"
+     inkscape:window-maximized="1" />
+  <path
+     style="color:#000000;fill:#fff08b;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:6.1813693;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+     d="m 125.93864,98.872518 c -0.009,-0.685743 -0.68406,-1.277866 -1.42388,-1.248212 l -15.76003,0.630734 -56.285668,2.25282 -45.5914241,1.82489 c -1.0459723,0.0424 -1.9589962,0.93548 -1.9465597,1.90518 l 1.7798561,138.8014 c 0.012437,0.96977 0.947448,1.78948 1.9934245,1.74752 L 110.58138,240.70913 c 1.046,-0.0402 1.95917,-0.93553 1.94667,-1.90515 l -0.98024,-76.44525 13.78995,-0.55375 c 0.74031,-0.0302 1.39924,-0.67454 1.39041,-1.3607 l -0.78971,-61.573643 z"
+     id="rect2995"
+     inkscape:connector-curvature="0" />
+  <path
+     sodipodi:type="inkscape:offset"
+     inkscape:radius="2.4501352"
+     inkscape:original="M 57.65625 97.4375 L 54.65625 100.4375 L 62.15625 107.9375 L 54.65625 115.4375 L 57.65625 118.4375 L 65.15625 110.9375 L 72.65625 118.4375 L 75.65625 115.4375 L 68.15625 107.9375 L 75.65625 100.4375 L 72.65625 97.4375 L 65.15625 104.9375 L 57.65625 97.4375 z "
+     style="fill:url(#linearGradient5200);fill-opacity:1;fill-rule:evenodd;stroke:#a40000;stroke-width:0.96144354;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+     id="path2398"
+     d="m 57.375,95 a 2.4503802,2.4503802 0 0 0 -1.4375,0.71875 l -3,3 a 2.4503802,2.4503802 0 0 0 0,3.4375 l 5.78125,5.78125 -5.78125,5.78125 a 2.4503802,2.4503802 0 0 0 0,3.4375 l 3,3 a 2.4503802,2.4503802 0 0 0 3.4375,0 l 5.78125,-5.78125 5.78125,5.78125 a 2.4503802,2.4503802 0 0 0 3.4375,0 l 3,-3 a 2.4503802,2.4503802 0 0 0 0,-3.4375 l -5.78125,-5.78125 5.78125,-5.78125 a 2.4503802,2.4503802 0 0 0 0,-3.4375 l -3,-3 a 2.4503802,2.4503802 0 0 0 -3.4375,0 L 65.15625,101.5 59.375,95.71875 A 2.4503802,2.4503802 0 0 0 57.375,95 z"
+     transform="matrix(6.5214991,0,0,6.5213881,-254.71965,-616.99174)" />
+  <path
+     style="color:#000000;fill:#fff08b;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:6.90631437;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+     d="m 126.53106,174.8151 c -0.002,-0.73164 -0.68305,-1.31092 -1.58265,-1.35089 l -18.6286,-0.81954 -0.18942,-62.78471 c -0.002,-0.674 -0.75201,-1.31432 -1.58251,-1.35078 L 7.3000652,104.2305 c -0.8291401,-0.0366 -1.5767724,0.53831 -1.5747635,1.21186 l 0.4190185,138.89489 c 0.00201,0.67395 0.7526549,1.31425 1.5825125,1.35078 l 70.7257353,3.11177 c 0.209509,0.54277 0.538841,1.0484 1.265881,1.08068 l 45.466451,2.00049 c 0.89981,0.0402 1.57713,-0.48056 1.5749,-1.21195 l -0.22887,-75.85389 z"
+     id="rect3043"
+     inkscape:connector-curvature="0" />
+  <text
+     xml:space="preserve"
+     style="font-size:142.12782288px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000080;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial Bold"
+     x="12.382761"
+     y="221.77342"
+     id="text3821"
+     sodipodi:linespacing="125%"
+     transform="scale(0.9640397,1.0373017)"><tspan
+       sodipodi:role="line"
+       id="tspan3823"
+       x="12.382761"
+       y="221.77342">S</tspan></text>
+</svg>

File tortoisehg/hgqt/filelistmodel.py

 
 nullvariant = QVariant()
 
-def getSubrepoIcoDict():
+def getSubrepoIcoDict(baseicon='thg-subrepo'):
     'Return a dictionary mapping each subrepo type to the corresponding icon'
     _subrepoType2IcoMap = {
       'hg': 'hg',
       'hgsubversion': 'thg-svn-subrepo',
       'empty': 'hg'
     }
-    icOverlay = geticon('thg-subrepo')
+    icOverlay = geticon(baseicon)
     subrepoIcoDict = {}
     for stype in _subrepoType2IcoMap:
         ic = geticon(_subrepoType2IcoMap[stype])
         self._files = []
         self._filesdict = {}
         self._fulllist = False
-        self._subrepoIcoDict = getSubrepoIcoDict()
+        self._subrepoIcoDict = {
+            'M': getSubrepoIcoDict(),
+            'A': getSubrepoIcoDict('thg-added-subrepo'),
+            'R': getSubrepoIcoDict('thg-removed-subrepo'),
+        }
 
     @pyqtSlot(bool)
     def toggleFullFileList(self, value):
                         sp2rev = self._ctx.p2().substate.get(s, subrepo.nullstate)[1]
                     if srev != sp1rev or (sp2rev != '' and srev != sp2rev):
                         wasmerged = ismerge and s in ctxfiles
-                        files.append({'path': s, 'status': 'S', 'parent': parent,
-                          'wasmerged': wasmerged, 'stype': stype})
+                        substatus = 'M'
+                        if sp1rev == '':
+                            substatus = 'A'
+                        files.append({
+                            'path': s, 'status': 'S', 'parent': parent,
+                            'stype': stype, 'wasmerged': wasmerged,
+                            'substatus': substatus,
+                        })
                 # Add the list of missing subrepos
                 subreposet = set(self._ctx.substate.keys())
                 subrepoparent1set = set(self._ctx.p1().substate.keys())
                 for s in missingsubreposet:
                     wasmerged = ismerge and s in ctxfiles
                     stype = self._ctx.p1().substate.get(s, subrepo.nullstate)[2]
-                    files.append({'path': s, 'status': 'S', 'parent': parent,
-                      'wasmerged': wasmerged, 'stype': stype})
+                    files.append({
+                        'path': s, 'status': 'S', 'parent': parent,
+                        'stype': stype, 'wasmerged': wasmerged,
+                        'substatus': 'R',
+                    })
 
         if self._fulllist and ismerge:
             func = lambda x: True
                 return QVariant(geticon('filedelete'))
             elif current_file_desc['status'] == 'S':
                 stype = current_file_desc.get('stype', 'hg')
-                return QVariant(self._subrepoIcoDict[stype])
+                substatus = current_file_desc['substatus']
+                return QVariant(self._subrepoIcoDict[substatus][stype])
             #else:
             #    return QVariant(geticon('filemodify'))
         elif role == Qt.FontRole: