AutoScale problem on 320x240 device

NewKreation

Member
Licensed User
The Motorola Q9c has a 2.4-inch diagonal TFT non-touch screen at a 320x240 pixel resolution.

When my AutoScaled application is run on the Q9c the application is scaled up 1.5 times. The result chops off the bottom of my application. The application works fine on the "normal" 320x320 screens.

Does anyone have an idea on how to turn-off the AutoScale programatically? Any other ideas would be appreciated.

I would like to avoid compiling a separate EXE with Auto Scale turned off(Besides, how would the end-user know which version to install?).

Thank you in advance.
trapezium.png
 

agraham

Expert
Licensed User
Longtime User
What values do ScreenScaleX and ScreenScaleY return in an app on your Q9c?

You say "The application works fine on the "normal" 320x320 screens". Is this when AutoScaled or not? Did you mean 240 x 320 or even 240 X 240?

What size of form is your application laid out for and does it look OK on the Q9c when not AutoScaled.
 

NewKreation

Member
Licensed User
What values do ScreenScaleX and ScreenScaleY return in an app on your Q9c?
I am not 100% sure, I will need to send a test app to our customer for this answer.

You say "The application works fine on the "normal" 320x320 screens". Is this when AutoScaled or not?
AutoScaled

Did you mean 240 x 320 or even 240 X 240?
The screen dimensions are here, and take a look at the dimensions on the screen shot in the initial post. It is actually a non-standard 320 x 240.

What size of form is your application laid out for
(240 x 320) All input boxes are above the black line at about 188 pixels from the top.

and does it look OK on the Q9c when not AutoScaled.
I am not 100% sure, I will need to send a test app to our customer for this answer.
 

agraham

Expert
Licensed User
Longtime User
The screen dimensions are ...
Sorry, I was querying your statement of "normal" 320x320 screens not the screen size of the Q9c.

With a form size of 240 x 320 I would expect a non-AutoScaled app to display on over 2/3 of the width of the Q9c but I would still expect the bottom to be cut off.

When AutoScaled the size will depend upon the logical dpi of the display which ScreenScaleX/Y will (indirectly) give us. I wonder if the Q9c has a non-standard dpi of 128 which would mean that an AutoScaled application will fill the full width of the Q9c but lose even more off the bottom. According to that screen shot the Left value of the "h" input box is about 163, what is it laid out to be, 122?
 

NewKreation

Member
Licensed User
I think the DPI is standard. See the conceptual sketch below. It looks as though the entire app is being scaled by 1.5. The reasons for thinking this is the image is blurred and some of the app is under and below the menu bar.

autoscale.png
 

agraham

Expert
Licensed User
Longtime User
I see now, the pictures help.
It looks as though the entire app is being scaled by 1.5. The reasons for thinking this is the image is blurred and some of the app is under and below the menu bar.
If you mean when AutoScaled then yes. The image blurring is a side-effect of AutoScale - you can read details of what is happening in the AutoScale topic of the help for my http://www.b4x.com/forum/additional-libraries/1995-controlsexdevice-library.html#post10811

AutoScale assumes that a standard screen has a dpi of 96 pixels per inch. AutoScale takes the actual dpi of the screen and calculates a scaling factor so that the assumed pixel values of Top, Left, Width and Height are corrected to appear as expected on a screen with a different dpi. I expect that ScreenScaleX/Y reported on the Q9c will have values of 1.5 calculated from an actual screen dpi of 128. This would explain what your customer is seeing.
 

NewKreation

Member
Licensed User
We compiled an exe without AutoScale, sent it to the customer and it looks great! I would be even better if there was a way to disable/enable the AutoScale programatically.

segment.png
 
Top