A better way to adjust the dialogs to fit their contents?
authorAndy Allan <gravitystorm@gmail.com>
Thu, 9 Dec 2010 10:45:55 +0000 (10:45 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Thu, 9 Dec 2010 10:45:55 +0000 (10:45 +0000)
net/systemeD/potlatch2/BackgroundSelector.mxml
net/systemeD/potlatch2/StyleSelector.mxml

index 964bf98..6abcc57 100644 (file)
@@ -8,7 +8,7 @@
                        labelField="name"
                        change="Application.application.bgButton.close(); Imagery.instance().setBackground(background.selectedItem);"
                dataProvider="{Imagery.instance().getAvailableImagery()}"
-               updateComplete="{background.width=background.measureWidthOfItems()+2;background.height=background.measureHeightOfItems()+2}"/>
+               rowCount="{Imagery.instance().getAvailableImagery().length}"/>
        <mx:HBox>
        <mx:CheckBox width="100%" label="Dim" selected="{Application.application.theMap.getDimming()}" id="dim"
            change="setDimming(dim.selected)" />
index 71bcfed..28c3cb9 100644 (file)
@@ -8,7 +8,7 @@
                labelField="name"
                change="Application.application.styleButton.close(); Stylesheets.instance().setStylesheet(mapStyle.selectedItem.name, mapStyle.selectedItem.url);"
                dataProvider="{Stylesheets.instance().getCollection()}"
-               updateComplete="{mapStyle.width=mapStyle.measureWidthOfItems()+2;mapStyle.height=mapStyle.measureHeightOfItems()+2}" />
+               rowCount="{Stylesheets.instance().getCollection().length}" />
 
        <mx:Button label="Edit..." click="new BackgroundDialog().init('Map style',mapStyle,Stylesheets.instance());" />