Hi Alex,
Here is the view and dom in same page,
And the source code :
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.apache.org/royale/spark"
xmlns:mx="library://ns.apache.org/royale/mx"
currentState="loggedOutState"
height="100%"
width="100%">
<fx:Metadata>
[ResourceBundle("messages")]
</fx:Metadata>
<s:states>
<s:State name="loggedOutState"/>
</s:states>
<fx:Script>
<![CDATA[
[Bindable]
private var trIcon:Class;
[Bindable]
private var enIcon:Class;
private function changeLocale(locale:String):void {
}
protected function button_clickHandler(event:MouseEvent):void {
}
]]>
</fx:Script>
<fx:Declarations>
</fx:Declarations>
<s:layout>
<s:VerticalLayout gap="10" paddingRight="10" paddingLeft="10"
paddingTop="10" paddingBottom="20" />
</s:layout>
<s:Group width="320" height="170" includeIn="loggedOutState">
<s:Panel
horizontalCenter="0"
verticalCenter="0"
id="loginPanel"
width="100%"
height="100%"
chromeColor="#E2E5E7"
title="{resourceManager.getString('messages', 'loginTitle')}"
>
<mx:Button y="-27" right="30" width="20"
click="changeLocale('tr_TR')" icon="{trIcon}" toolTip="Türkçe"/>
<mx:Button y="-27" right="5" width="20"
click="changeLocale('en_US')" icon="{enIcon}" toolTip="English"/>
<mx:Form width="100%" height="100%"><!--
defaultButton="{button}" -->
<mx:FormItem
label="{resourceManager.getString('messages', 'userName')}">
<s:TextInput id="userName" width="200"/>
</mx:FormItem>
<mx:FormItem
label="{resourceManager.getString('messages', 'password')}">
<s:TextInput id="password" displayAsPassword="true"
width="200"/>
</mx:FormItem>
<mx:FormItem paddingLeft="63" paddingTop="10">
<s:Button id="button" width="64"
label="{resourceManager.getString('messages', 'login')}"
click="button_clickHandler(event)"/>
</mx:FormItem>
</mx:Form>
</s:Panel>
</s:Group>
<s:Group width="320" height="170">
<s:Panel
horizontalCenter="0"
verticalCenter="0"
id="loginPanel1"
width="100%"
height="100%"
chromeColor="#E2E5E7"
title="{resourceManager.getString('messages', 'loginTitle')}"
>
<mx:Button y="-27" right="30" width="20"
click="changeLocale('tr_TR')" icon="{trIcon}" toolTip="Türkçe"/>
<mx:Button y="-27" right="5" width="20"
click="changeLocale('en_US')" icon="{enIcon}" toolTip="English"/>
<mx:Form width="100%" height="100%"><!--
defaultButton="{button}" -->
<mx:FormItem
label="{resourceManager.getString('messages', 'userName')}">
<s:TextInput id="userName1" width="200"/>
</mx:FormItem>
<mx:FormItem
label="{resourceManager.getString('messages', 'password')}">
<s:TextInput id="password1"
displayAsPassword="true" width="200"/>
</mx:FormItem>
<mx:FormItem paddingLeft="63" paddingTop="10">
<s:Button id="button1" width="64"
label="{resourceManager.getString('messages', 'login')}"
click="button_clickHandler(event)"/>
</mx:FormItem>
</mx:Form>
</s:Panel>
</s:Group>
</s:Application>
Would like me to create a test project or the source is enough for the
github issue ?
Thanks,
Serkan
10.01.2019 00:36 tarihinde Alex Harui yazdı:
Hi Serkan,
Compare the DOM Element trees in the debugger. Is the Group getting
the same size in both cases? How about the login form’s size? My
guess is that some component somewhere needs to kick off another
layout when the group is added to the DOM. You can dispatch a
“layoutNeeded” event and force a re-layout of the parent of the
component that has the wrong size.
If you can build a simple test case, open a GitHub issue and we’ll
take a look.
-Alex
*From: *Serkan Taş <serkan....@likyateknoloji.com>
*Reply-To: *"users@royale.apache.org" <users@royale.apache.org>
*Date: *Wednesday, January 9, 2019 at 1:17 PM
*To: *"users@royale.apache.org" <users@royale.apache.org>
*Subject: *Re: Work on Emulation
Hi Alex,
It seems like the form elements without an id is rendered correctly
from the locale resource after your fix.
But, now I have another issue. When using state with includein for a
component, the layout is rendered ugly beside the one without state
definition.
The one has definition below (it is the part of the code not all source):
<s:Group width="100%" height="100%" >
<main:LoginForm id="loginForm" />
</s:Group>
cid:part1.71359BC1.059A3FA6@likyateknoloji.com
And this is the one with state (the default state is defined in
application header as loggedOutState):
<s:Group width="100%" height="100%" includeIn="loggedOutState">
<main:LoginForm id="loginForm" />
</s:Group>
cid:part2.FEB67879.166CA048@likyateknoloji.com
Thanks,
Serkan
3.01.2019 11:34 tarihinde Serkan Taş yazdı:
Thanks Alex,
I am going to work on.
Thanks,