Difference on graphics lc8.x.x and lc7.1.4

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

Difference on graphics lc8.x.x and lc7.1.4

Post by sphere » Sat Jul 30, 2016 1:24 pm

Hi,

i don't know if others have noticed this too, but i see differences in how the datagrid looks when exporting to Android APK using LC8.0.2rc3 or LC7.1.4
On LC 7.1.4 it is correct on LC8.0.2rc3 it is not correct. This is only noticeable on the phone, not the IDE.
The text of the headers is shifted downwards on lc8.0.2rc3.
It is the same stack which is used and on the same phone, only exported on the different LC versions.

See these images to clarify:
exported on LC8.0.2rc3
IMG_0838.JPG
exported on LC7.1.4
IMG_0840.JPG
Anyone else have noticed this or any other strange behaviour on Android using lc8.x.x against lc7.1.4 ?
Or is there something i can do myself about it?

Thanks!
Sphere

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Difference on graphics lc8.x.x and lc7.1.4

Post by [-hh] » Sat Jul 30, 2016 3:55 pm

Hi sphere,
such offsets possibly happen independent of the platform also for other fields, because the text handling changed essentially with LC 8.
The incomplete "metrics" of some textfonts are the culprit.

The workaround I use is to adjust the topmargin of the corresponding fields. In your case of a datagrid the following could work.

Code: Select all

on mouseUp
  put "Datagrid 1" into d1
  repeat with i=1 to the num of flds of grp d1
    if the short name of fld i of grp d1 is "HeaderLabel" then
      if the version > 7 then
          set topmargin of fld i of grp d1 to 6
      else set topmargin of fld i of grp d1 to 8 -- the default
    end if
  end repeat
end mouseUp
shiftLock happens

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

Re: Difference on graphics lc8.x.x and lc7.1.4

Post by sphere » Sat Jul 30, 2016 6:06 pm

Hello -hh,

thanks a lot.
I will check if this helps.

Could it be that this will not occur when using the datagrid from lc8.x.x ?
As this stack was original written on lc7.x.x.

Because it would be strange if this solution is needed every time when writing and exporting in lc8.

If this would only be neccesary when using a stack from an older version of lc then i can understand.
Else it would seem like a graphical bug.

Regards,
Sphere

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Difference on graphics lc8.x.x and lc7.1.4

Post by [-hh] » Sat Jul 30, 2016 8:51 pm

Hi Sphere,
sphere wrote:Could it be that this will not occur when using the datagrid from lc8.x.x ?
As this stack was original written on lc7.x.x.
I don't know (but await the answer "NO"), hopefully a datagrid expert comes in to answer that.

I answered because I think it is a general failure of the LC 8 text engine and not directly related to special objects.

You could try to find a font that does what you want without adjustments. For some projects I had good luck with "Verdana" (one of the 'cross-browser' fonts). In some other projects (*early* HTML5) there was a vertical 'correction' of up to 10 needed for the only available font "Droid Sans".

At any rate you should get what you see when both writing and exporting in LC 8.

And you should report any vertical offset with the default font settings (or some named true type fonts) as bug (your report is nearly finished!)

Kind regards, Hermann
shiftLock happens

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

Re: Difference on graphics lc8.x.x and lc7.1.4

Post by sphere » Sat Jul 30, 2016 10:04 pm

Hi Hermann,

thanks for your explanation.
Yes maybe i'll file this as a bug, because in the IDE it all looks the same in both versions of LC 7.1.4 / 8.0.2rc3.
Only the export differs.

I can try a different font too and see what it does.
I think i will use a test stack.
Because the project i was working on, it is not neccessary to use lc8 yet.

Danke Sehr.

Best regards,
Sphere

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

Re: Difference on graphics lc8.x.x and lc7.1.4

Post by sphere » Sun Jul 31, 2016 3:21 pm


Post Reply