I have the following code in my ui-binder.
<m:ListPanel selectable="false">
<m:ListItem>
<g:Label ui:field="sortLabel"></g:Label>
<m:DropDownList ui:field="sortDropDown" />
</m:ListItem>
<m:ListItem>
<g:Label ui:field="doneLabel"></g:Label>
<m:FlipSwitch ui:field="displayDone" value="false"/>
</m:ListItem>
</m:ListPanel>
I want that the dropdownlist and the flipSwitch is in the same vertical alignment.
Currently is the flipSwitch a little bit too much on the right side.
Unfortunately
ListPanelitself (which extends fromPanelBase) does not support alignment. This was probably just an oversight. They used aFlowPanelwhich isn’t capable of providing alignment without CSS hacks to change its structure.In order to get them aligned, you could:
PanelBasethat does support alignment by using another type of panel in place ofFlowPanel _panel, then make your ownListPanelwhich extends from your newPanelBase. Probably your best bet.OR
FlowPaneluses a block layout style, and you need to make it something inline instead to support thevertical-alignCSS property. This could have unforeseeable effects, so again you probably want the first route.