Icons are misaligned when shown in browser

Posted on
Wed Mar 01, 2023 6:56 am
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Icons are misaligned when shown in browser

Hi all,

I'm seeing an issue in control pages (2022.2.1) where the icon alignment looks fine in both the editing of the control page AND in Indigo Touch, but when I view it in a browser on my Mac, the icon is shifted.

Here's what I see when editing the control page:

Screen Shot 2023-03-01 at 6.54.39 AM.png
Screen Shot 2023-03-01 at 6.54.39 AM.png (381.38 KiB) Viewed 1374 times


And here's what I see in the browser:

Screen Shot 2023-03-01 at 6.54.46 AM.png
Screen Shot 2023-03-01 at 6.54.46 AM.png (304.82 KiB) Viewed 1374 times


Any ideas what may be causing this?

Posted on
Mon Mar 06, 2023 5:17 pm
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Re: Icons are misaligned when shown in browser

Is there any feedback on this? Jay or Matt?

Posted on
Tue Mar 07, 2023 10:28 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Icons are misaligned when shown in browser

I notice that the two images are not the same (one with the door closed and one with it open). Are you sure that those custom images are the same dimensions? Custom heuristic images must have the same dimensions or oddness will likely occur.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Mar 07, 2023 1:17 pm
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Re: Icons are misaligned when shown in browser

Yes, they are the same. I'm attaching them. I have on/off images for two different sizes, so four images in total:

Door+true.png
Door+true.png (1.33 KiB) Viewed 1288 times

Door.png
Door.png (871 Bytes) Viewed 1288 times

Door 2x+true.png
Door 2x+true.png (3.25 KiB) Viewed 1288 times

Door 2x.png
Door 2x.png (1.87 KiB) Viewed 1288 times

Posted on
Wed Mar 08, 2023 9:31 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Icons are misaligned when shown in browser

Hmm. I just tried to replicate and I can't. Can you send me an email that control page in it? (you can drag a control page from the Home window to the Finder and it'll create a clipping file that you can zip up and send me). I'm assuming you're using those images as variable state representations (because of the +true on the end). It looks like you have a background image so send that along as well.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Mar 08, 2023 10:46 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Icons are misaligned when shown in browser

Also try stopping and restarting the Indigo Server and clearing your browser cache. If I remember correctly the Indigo Server caches the dimensions of the images when it first loads them, which is then used by the Web server for positioning. If the size of the image(s) changes then you might need to force that cache to be cleared (by restarting the server). If you haven't recently changed the images at all then this is unlikely to fix the problem, but it is worth a try.

Image

Posted on
Thu Mar 09, 2023 10:34 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Icons are misaligned when shown in browser

I got your db and saw what you were seeing. But, switching the image selector from "Door 2x.png" to "Door.png" and then back seems to fix it. As Matt suggested, I think there's some weird caching going on and perhaps the control page just saved the wrong dimensions (perhaps from an earlier version of those images). Switching the image caused Indigo to recalculate the dimension which will then render correctly. Let me know if that worked for you.

BTW, you can tell the dimensions are off when you select it - you can see the four corners that define the image corners (blue corners). Your version has a very large rectangle.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Mar 11, 2023 8:01 pm
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Re: Icons are misaligned when shown in browser

That's the hint I needed. Changing the icon to something else and back has fixed the problem. Thank you Jay and Matt!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 10 guests