Mapp View: SVG ImageColor changes correctly when used with Button but not Image

Hello,

We are developing in mapp View 6.5 and I have created a simple SVG (below) with a path and no fill assigned.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   width="16"
   height="16"
   viewBox="0 0 4.2333332 4.2333333"
   version="1.1"
   id="svg1"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:svg="http://www.w3.org/2000/svg">
  <path
       id="path"
       d="M 0.52916664,0 H 3.7041665 C 3.9973248,0 4.2333331,0.23600832 4.2333331,0.52916664 V 3.7041665 c 0,0.2931583 -0.2360083,0.5291666 -0.5291666,0.5291666 H 0.52916664 C 0.23600832,4.2333331 0,3.9973248 0,3.7041665 V 0.52916664 C 0,0.23600832 0.23600832,0 0.52916664,0 Z" />
</svg>

When I assign this SVG to be the image embedded in a Button, imageColor correctly sets the fill of this path.

However, when I use this SVG in Image or ImageList, imageColor has no effect on the fill of this path.

In all cases, useSVGStyling is set to true.

Am I incorrect in my assumption that these three widgets should behave identically? Should I be using the Paper widget instead? That seems like overkill.

Thanks for any help!

Hello Jonathan!

This seemed wierd to me so I tested your exact .svg on a button and in an image then swapped the ImageColor and for me it worked!

image

image

Have you made sure to update your mappview and AR?
This is what Im using when its working

Best Regards
Nicolas

Thanks for the response, Nicolas.

I didn’t update yet, but I realized that I had only been looking at the editor. It seems like this is just an editor bug and it works as intended when compiled and running. If the bug remains in 6.6, perhaps that’s worth making a note internally! But for now, I can just ignore it.

Thanks again!

I got same issue like this before, it is because the format of your svg file.

try to export it using iso-8859-1 encoding and use preserve styling.