Squash the formitems closer together, but this messes up the spacing between subcateg...
authorAndy Allan <andy@gravitystorm.co.uk>
Thu, 15 Dec 2011 09:48:00 +0000 (09:48 +0000)
committerAndy Allan <andy@gravitystorm.co.uk>
Thu, 15 Dec 2011 09:48:00 +0000 (09:48 +0000)
net/systemeD/potlatch2/TagViewer.mxml

index 82143aa..8d4f7fb 100644 (file)
                                        subpanels[category][subcategory]=subpanel;
                                        var form:Form = new Form();
                                        form.name = "form";
-                                       var layout:FormLayout = new FormLayout();
-                                       form.layout = layout;
+                                       form.layout = getFormLayout();
                                        subpanel.addChild(form);
                                        tabComponents[tab].push(subpanel);
                                }
           box.styleName = "dndEditorContainer";
           var form:Form = new Form();
           form.name = "form";
-          var layout:FormLayout = new FormLayout();
-          form.layout = layout;
+          form.layout = getFormLayout();
           box.addChild(form);
           return box;
       }
                if (rows!=Math.floor(rows)) { rows=Math.floor(rows+1); }
                event.target.height=rows*(event.target.rowHeight+1);
        }
+
+    private function getFormLayout():FormLayout {
+        var layout:FormLayout = new FormLayout();
+          // This is ugly, and should really be done with a skin. See
+          // http://stackoverflow.com/questions/5126756/flex-spark-form-item-gap
+        layout.gap = -8;
+        return layout;
+    }
   ]]></fx:Script>
 </mx:VBox>