Cant' center image from URL on WebImageView

Hello,

I’m finishing polishing up a web app and got into some strange behaviour with WebImageViews…

I use them to simulate buttons with icons. You can check the looks of it here:

If you feel so, please take a peek at the app using these credentials:

Usurio (User): xojotest
Senha (Password): xojotest

It takes a while to load as it scans several databases in search of a match…

The app is in Portuguese, but you can have a general idea about it even though the language barrier. Any feedback is appreciated!

The web app is developed in a Windows IDE and deployed to an Ubuntu 16.04.04 LTS 64 bits VPS server as StandAlone.

I was used to write and check code with Xojo 2017r3 and recently changed to 2018r1.

On the first deployment after changing IDE, I noticed all my button icons were gone. I had included them by adding them to the project and setting the “Picture” property of each webimageview accordingly. It worked ok on 2017r3. Webtoolbar icons presented the same behaviour change.

After reading a lot here in the Forum, as I couldn’t find anything related to the vanished pictures and as I did find some guidance about performance of the web app, I decided to have the images of the icons served directly from the internet. So I configured the “URL” property of each webimageview accordingly and it worked fine… almost.

Images are shown inside webimageviews as they should be, but I can’t get them centered. Setting WebImageView properties “AlignHorizontal = Center” and “AlignVertical = Middle” in the IDE seems to have no effect either on Debug (Windows) or Build (Linux).

When I look at Chrome’s Developer Tools Elements function, the html for one of the buttons is:

<img src="http://zepiweb.com.br/zePIWeb%20Resources/accept.png" alt="" border="0" style="position: absolute;" id="Yf88V5vj_image" class="">

With all that said, I ask:

Is there a way to get these images, loaded by URL property of WebImageView, properly centered?

If it is not an abuse, I also would like some guidance on the piece of code below, used to preload images used on the Webtoolbar. It works fine on debug (Windows) but fails on build (Linux)…

[code]
'Properties under App:
Public Property icones as Dictionary
Public Property lista_icones() as String

'lista_icones is set in the function Prepare_Icon List, that goes like this:

ReDim lista_icones(-1)

lista_icones.Append(“application_cascade”)
lista_icones.Append(“Arrow Left”)
lista_icones.Append(“balance”)
lista_icones.Append(“Bookmarks 2”)
lista_icones.Append(“building_key”)
lista_icones.Append(“cancel”)
lista_icones.Append(“caution_high_voltage”)
lista_icones.Append(“Cog”)
lista_icones.Append(“Database”)
lista_icones.Append(“Drawer Open”)
lista_icones.Append(“emotion_question”)
lista_icones.Append(“flask”)
lista_icones.Append(“group”)
lista_icones.Append(“interface_preferences”)
lista_icones.Append(“lbm-zepi-32”)
lista_icones.Append(“note_edit”)
lista_icones.Append(“System Activity Monitor”)
lista_icones.Append(“Users”)

'code in function called Load_Icons()
Dim ik, ikmax As Integer
Dim ff As FolderItem
Dim ico As WebPicture

ikmax = lista_icones.Ubound -1

For ik = 0 to ikmax

#If DebugBuild Then

ff = GetFolderItem(App.ExecutableFile.Parent.NativePath + Left(App.ExecutableFile.Name, Len(App.ExecutableFile.Name) - 4)+" Resources\" + lista_icones(ik) + ".png")

#Else

ff = GetFolderItem(App.ExecutableFile.Parent.NativePath + App.ExecutableFile.Name +" Resources/""" + lista_icones(ik) + ".png""", FolderItem.PathTypeShell)

#Endif

If ff.Exists Then
ico = Picture.Open(ff)
ico.MIMEType = “image/png”
ico.Filename = lista_icones(ik) + “.png”
icones.Value(lista_icones(ik)) = ico
End If

Next[/code]

Thanks is advance!

For general feedback, use https 2.0 and you should see massive performance increases when loading lots of image icons.