<div dir="ltr"><div><div>Hi Alessandro, <br><br></div>according to <a href="http://www.devicepixelratio.com/" target="_blank">http://www.devicepixelratio.com/</a>, the webview shows a devicepixelratio of 1 when embedded in a QML application.<br>
<br></div>Here is the code used to embed the webview:<br><div><br>import QtQuick 2.0<br>import Sailfish.Silica 1.0<br>import QtWebKit 3.0<br><br>ApplicationWindow<br>{<br> initialPage: Component {<br> Page {<br>
id: page<br> SilicaFlickable {<br> anchors.fill: parent<br> contentHeight: column.height<br> WebView {<br> id: webView<br> anchors.fill: parent<br>
url: "<a href="http://www.devicepixelratio.com/">http://www.devicepixelratio.com/</a>"<br> }<br> }<br> }<br> }<br>}<br><br><br></div><div>Greetings<br>
</div><div>Daniel<br></div><div><br><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-16 16:14 GMT+02:00 Alessandro Portale <span dir="ltr"><<a href="mailto:alessandro@casaportale.de" target="_blank">alessandro@casaportale.de</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Most likely Daniel has the correct 960x540 device pixels. But I assume<br>
that he gets a devicePixelRatio of 1, which is too low for the Jolla<br>
device. With 244 PPI (I assume that's what the Jolla phone has) it<br>
should be a 2.0.<br>
<br>
What does the Jolla browser or the webview show here?<br>
<a href="http://www.devicepixelratio.com/" target="_blank">http://www.devicepixelratio.com/</a><br>
<div class="HOEnZb"><div class="h5"><br>
On Sat, Aug 16, 2014 at 12:03 PM, Andrea Bernabei<br>
<<a href="mailto:and.bernabei@gmail.com">and.bernabei@gmail.com</a>> wrote:<br>
> Hi Daniel :)<br>
><br>
> could you please elaborate more?<br>
> What's the issue you're having?<br>
><br>
> 960x540 is the resolution of the screen<br>
><br>
><br>
> 2014-08-16 11:55 GMT+02:00 Daniel Beck <<a href="mailto:d.danielbeck@googlemail.com">d.danielbeck@googlemail.com</a>>:<br>
>><br>
>> Hello,<br>
>><br>
>> I would like to create a webapp game application that runs inside a<br>
>> WebView.<br>
>> The problem is that the resolution reported by the HTML application is<br>
>> 960x540. The viewport of the HTML is set as follows:<br>
>><br>
>> <meta name="viewport" content="width=device-width, initial-scale=1"><br>
>><br>
>><br>
>> Apparently, the webview does not honnor the device pixel ration (DPR) of<br>
>> the device.<br>
>> Is there some property/configuration I can set for this in the QML?<br>
>><br>
>> WebView {<br>
>> id: webView<br>
>> anchors.fill: parent<br>
>> url: "index.html"<br>
>> }<br>
>><br>
>><br>
>> Thanks<br>
>> Daniel<br>
>><br>
>> _______________________________________________<br>
>> SailfishOS.org Devel mailing list<br>
>> To unsubscribe, please send a mail to<br>
>> <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> SailfishOS.org Devel mailing list<br>
> To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
</div></div></blockquote></div><br></div>