<div dir="ltr">Hi all<div><br></div><div>Current SailfishOS web site tells to use mailing list as a bug tracker, so let's try :)</div><div><br></div><div>Silica Slider ignores initial value property if it's over one even if minimalValue/maximalValue should allow it. Setting value later works just fine. I guess during initialization Slider checks value validity before minimal/maximalValue are taken into account so default limits of 0..1 are applied.</div>

<div><br></div><div>Here's code for a page for reproducing:</div><div><br></div><div>======</div><div>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(255,255,85)">import</span><span style="color:rgb(192,192,192)"> </span>QtQuick<span style="color:rgb(192,192,192)"> </span>2.0</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(255,255,85)">import</span><span style="color:rgb(192,192,192)"> </span>Sailfish.Silica<span style="color:rgb(192,192,192)"> </span>1.0</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(85,255,85)">Page</span><span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(255,85,85)">id</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">page</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(85,255,255)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,255)">To</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,255)">enable</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,255)">PullDownMenu,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,255)">place</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,255)">our</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,255)">content</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,255)">in</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,255)">a</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,255)">SilicaFlickable</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(85,255,85)">SilicaFlickable</span><span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(255,85,85)">anchors.fill</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">parent</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(85,255,85)">Slider</span><span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(255,85,85)">id</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">slider</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(255,85,85)">anchors.top</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">parent</span>.top</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(255,85,85)">anchors.topMargin</span>:<span style="color:rgb(192,192,192)"> </span>50</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(255,85,85)">width</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">parent</span>.width</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(255,85,85)">height</span>:<span style="color:rgb(192,192,192)"> </span>200</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(255,85,85)">minimumValue</span>:<span style="color:rgb(192,192,192)"> </span>0</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(255,85,85)">maximumValue</span>:<span style="color:rgb(192,192,192)"> </span>100</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(255,85,85)">value</span>:<span style="color:rgb(192,192,192)"> </span>50</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(255,85,85)">valueText</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">value</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(255,85,85)">onValueChanged</span>:<span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="font-style:italic;color:rgb(136,136,255)">console</span>.log(<span style="color:rgb(255,85,255)">"value</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">changed</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">"</span><span style="color:rgb(192,192,192)"> </span>+<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">value</span>)</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(85,255,85)">Label</span><span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">id</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">commentLabel</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">anchors.top</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">slider</span>.bottom</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">anchors.left</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">parent</span>.left</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">anchors.right</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">parent</span>.right</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">text</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">"value</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">should</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">be</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">50</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">from</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">beginning"</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">wrapMode</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,85)">Text</span>.WrapAtWordBoundaryOrAnywhere</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(85,255,85)">Button</span><span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">anchors.top</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">commentLabel</span>.bottom</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">anchors.left</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">parent</span>.left</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">anchors.right</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">parent</span>.right</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">text</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">"Set</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">value</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">50</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">now!"</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(255,85,85)">onClicked</span>:<span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                    </span><span style="font-style:italic">slider</span>.value<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>50</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px">}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre></div><div>======</div><div><br></div><div>Best regards,</div><div>Artem.<br clear="all"><div><br></div>-- <br>Artem Marchenko<br><a href="http://agilesoftwaredevelopment.com" target="_blank">http://agilesoftwaredevelopment.com</a><br>

<a href="http://twitter.com/AgileArtem" target="_blank">http://twitter.com/AgileArtem</a>
</div></div>