2d panel scaling

It's an issue I never found an answer for and it has been bugging me recently while we were working on the Airbusses.
When we use a 2d gauge the height/width aspect ratio seems to be lost no matter what is in the panel config. Is there some trick I am missing?

[Window01]
file=../../Aerosoft A318_A319 Base 2018/Panel_Fallback/MCDUIMG.bmp
file_1024_night=../../Aerosoft A318_A319 Base 2018/Panel_Fallback/MCDUIMG_NIGHT.bmp
Background_color=0,0,0
size_mm=430,726
window_size_ratio=0.250
position=7
visible=0
ident=10021
window_size= 0.350, 0.750
window_pos= 0.650, 0.250
//sizeable=0
 

DragonflightDesign

Resource contributor
I've never bothered with window aspect ratios for that very reason. I could never get them to work consistently either, so I always size the gauges on the gaugeXX line. That doesn't seem to give any problems.
 

Heretic

Resource contributor
Some parameters are mutually exclusive. From the SDK:

windowsize_ratio: A multiplier for the size of the panel window (default is 1.0 for 100% of the original size). This is ignored if window_size is set.
For example, if the size_mm for a given panel is 200, 200 and the size_mm for the first panel in the panel.cfg is 1024 x 768, the given panel would occupy 19% of the screen in the x dimension and 26% in the y dimension, or a total of 5% of the total screen area. If windowsize_ratio value to set to 2.0, the panel’s x dimension will be 38% of the screen width; its y dimension will be 52% of the screen height. In total, the panel will now occupy 20% of the total screen area.

window_pos: Overrides the position and windowsize_ratio variables. Provide at least an x value, the y value is optional.

window_size The percentage of the screen to be taken up by window, from 0 to 1. If this is set, the size of the main panel is ignored for this panel and size_mm becomes irrelevant for determining the size of the panel window. (size_mm is still used for calculating the relative sizes of the gauges within the window).
More: https://msdn.microsoft.com/en-us/library/cc526956.aspx


So basically, all you need to have a panel take up 15% of the screen width is:

size_mm=200,600
window_size=0.15


Size_mm to define the window "canvas" dimensions and window_size to stretch it to 15% width.
 
Top