Desktop image viewer not fitting on targetlinux?

Hello everyone!

How are you today?

I’m finishing / adjusting a game, and i want to make it available for linux users too.

on mac and windows, a image on a desktopImageViewer “auto” fits inside the control
on linux don’t!

it’s a bug?

Alex

XOJO IDE

MAC

WINDOWS

LINUX

That looks like a problem with high dpi. You might need to turn off retina support for Linux (or turn it on in Linux)

I turned off the high dpi on Xojo. same problem.

For now, I created my own method to fix this.

#if TargetLinux then
  if autoFit then
    var scaledImage as Picture
    scaledImage = new picture(me.Width, me.Height)
    scaledimage.Graphics.DrawPicture(me.Image, 2, 2, me.Width-5, me.Height-5, 0, 0, me.Image.Width, me.Image.Height)
    me.Image = scaledImage
  end if
#endif

What is the image dpi ?

The default DPI value is on window screen is 96 instead of 96. (as is on Windows).

yes, I know.

the image dpi has no influence on this case. an image with 1928x1544 at 72dpi or 300dpi does not change the “size” of the image. it’ll be always… 1928x1544.

the problem is the “auto fitting” does not work on linux, only on Mac and windows.

it’s a bug, I reported.

What is that ? I do not found it in DesktopImageViewer.