<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">any ideas on how to fix this IconButton issue? Is there a way to query SFOS version and make an ugly fix on the basis of that...</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Cheers,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Rinigus</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 3, 2019 at 6:06 PM rinigus <<a href="mailto:rinigus.git@gmail.com">rinigus.git@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Slava,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">unfortunately, it doesn't work. IconButton property icon has color subpropery defined in earlier SFOS versions as well. So, </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><pre style="font-size:small;margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(100,100,130)">            </span>IconButton<span style="color:rgb(100,100,130)"> </span>{</font></pre>
<pre style="font-size:small;margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(100,100,130)">                </span><span style="color:rgb(255,85,85)">id</span>:<span style="color:rgb(100,100,130)"> </span><span style="font-style:italic">image</span></font></pre>
<pre style="font-size:small;margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(100,100,130)">                </span><font color="#ff5555">[...]</font><br></font></pre>
<pre style="font-size:small;margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(100,100,130)">                </span><span style="color:rgb(255,85,85)">Component.onCompleted</span>:<span style="color:rgb(100,100,130)"> </span>{</font></pre>
<pre style="font-size:small;margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(100,100,130)">                    </span><span style="color:rgb(1,253,253)">if</span><span style="color:rgb(100,100,130)"> </span>(<span style="color:rgb(233,151,117)">"color"</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(1,253,253)">in</span><span style="color:rgb(100,100,130)"> </span><span style="font-style:italic">image</span>.icon)</font></pre>
<pre style="font-size:small;margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(100,100,130)">                        </span><span style="font-style:italic">image</span>.icon.color<span style="color:rgb(100,100,130)"> </span>=<span style="color:rgb(100,100,130)"> </span>undefined;</font></pre>
<pre style="font-size:small;margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(100,100,130)">                </span>}</font></pre>
<pre style="font-size:small;margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(100,100,130)">            </span>}</font></pre>
<pre style="font-size:small;margin-top:0px;margin-bottom:0px"><br></pre>results in lots of warnings (Cannot assigned [undefined] to QColor).</div><div class="gmail_default"><br></div><div class="gmail_default">Maybe there is some var I can check in QML to state that SFOS version is >= 3.1.0.0?</div><div class="gmail_default"><br></div><div class="gmail_default">Rinigus</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 3, 2019 at 5:33 PM Slava Monich <<a href="mailto:slava.monich@jolla.com" target="_blank">slava.monich@jolla.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p>I don't think there's an "official" way of maintaining backward
      compatibility but I'd humbly suggest something like if ("color" in
      icon) ...<br>
    </p>
    <p>e.g. I do this kind of thing to notifications:<br>
    </p>
    <p>    Notification {<br>
              id: clipboardNotification<br>
              previewBody: "Copied to clipboard"<br>
              Component.onCompleted: {<br>
                  if ("icon" in clipboardNotification) {<br>
                      clipboardNotification.icon = "icon-s-clipboard"<br>
                  }<br>
              }<br>
          }<br>
    </p>
    <p>Cheers,</p>
    <p>-Slava<br>
    </p>
    <div class="gmail-m_-8291573472929227934gmail-m_-3853658789653936300moz-cite-prefix"><br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div class="gmail_default" style="font-size:small">Hi,<br>
        </div>
        <div class="gmail_default" style="font-size:small"><br>
        </div>
        <div class="gmail_default" style="font-size:small">due to the
          changes in handling of icon coloring of IconButton in SFOS
          3.1, I am getting a steady stream of EA users complaining
          about the absence of icons in Pure Maps - as in <a href="http://talk.maemo.org/showpost.php?p=1558483&postcount=773" target="_blank">http://talk.maemo.org/showpost.php?p=1558483&postcount=773</a>
          . The issue has been described well in <a href="https://together.jolla.com/question/209315/bug-31011-qml-iconbutton-problems/" target="_blank">https://together.jolla.com/question/209315/bug-31011-qml-iconbutton-problems/</a>
          without any response from Jolla devs. Let's see if we can get
          this response over here.</div>
        <div class="gmail_default" style="font-size:small"><br>
        </div>
        <div class="gmail_default" style="font-size:small">In Pure Maps,
          icons are expected to be drawn according to the styling given
          by map, not by ambience. I was told that I can set icon.color:
          undefined as a property. However, when doing it for SFOS
          versions <3.1, this leads to lots of warning messages on
          stdout. What's an official way that I am expected to use when
          I want to support earlier SFOS versions as well?</div>
        <div class="gmail_default" style="font-size:small"><br>
        </div>
        <div class="gmail_default" style="font-size:small">Cheers,</div>
        <div class="gmail_default" style="font-size:small"><br>
        </div>
        <div class="gmail_default" style="font-size:small">Rinigus</div>
      </div>
      <br>
    </blockquote>
  </div>

</blockquote></div>
</blockquote></div>