Air bug? minHeight/minWidth
I have experienced something that could be a bug (feature?).
For example, if you set a window’s x position to 100 differs if you have specified a minWidth. Somehow i think the registration point changes.
This method corrects the bad positioning of the window:
- import flash.display.Screen;
- import mx.core.Window;
- public function fixPositioning(win:Window):void{
- win.nativeWindow.x += (win.nativeWindow.x * 1.5) + (Screen.mainScreen.visibleBounds.width * 0.5);
- }
It’s the same for the y positioning.
Any explanation as of why this happens is greatly appreciated :)
BTW, it happens with NativeWindow instances not only with Window’s.
—fernando