I've opened an issue for this in the issuetracker so you can follow its
progress there.
https://github.com/codenameone/CodenameOne/issues/3211

On Mon, Aug 10, 2020 at 5:40 AM Steve Hannah <[email protected]>
wrote:

> Currently the browser component in the simulator doesn't fully incorporate
> the skin DPI settings.  It sets itself to the DPI of the display, not the
> skin.  This is an improvement over the way the JavaFX webview dealt with
> HiDPI, but it is still something on my list to improve.  When using the
> desktop skin you'll get good results.  For other themes, you'll probably
> need to size the simulator window appropriately to approximate the relative
> size for now.
>
> On Mon, Aug 10, 2020 at 2:19 AM 'P5music' via CodenameOne Discussions <
> [email protected]> wrote:
>
>> My app has a layout with a BrowserComponent inside.
>> It has text and images inside:
>>
>> setPage("<HTML><BODY>" +
>>                 "<img  src='"+locationIconUri+"' />"+
>>                 "<div id=\"editText\" style=\"font-size:40px;\"
>> contenteditable=\"true\">This text can be edited by the
>> user.</div></BODY></HTML>","");
>>
>> I am able to encode some images and put them on the page, with:
>>
>> public String createIconImageUri(Image iconImage)
>>     {
>>         EncodedImage em = EncodedImage.createFromImage(iconImage, false);
>>         byte[] data = em.getImageData();
>>         String iconUri=BrowserComponent.createDataURI(data,"image/png");
>>         return iconUri;
>>     }
>>
>> I see that the text and the image size does not match what is in the
>> layout external to the BrowserComponent, like they are doubled in the BC.
>> There is some dpi question here. Note that the simulator skin is iPad3
>> and dpi=240 (wrong? see my other thread) and the size of the images on the
>> layout is 72.
>> What can be said about the viewport of the CEF BrowserComponent or
>> similar adjustments?
>> Thanks in advance
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "CodenameOne Discussions" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/codenameone-discussions/56f03163-428c-4df1-a360-bbf0d9cccf19o%40googlegroups.com
>> <https://groups.google.com/d/msgid/codenameone-discussions/56f03163-428c-4df1-a360-bbf0d9cccf19o%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Steve Hannah
> Software Developer
> Codename One
> http://www.codenameone.com
>


-- 
Steve Hannah
Software Developer
Codename One
http://www.codenameone.com

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKXU0gbXkkB8nt%3D25Rq%3DxSkxpsg7uOjjNGDk%3D1HDaLtRKg%40mail.gmail.com.

Reply via email to