OSDN Git Service

ADT: Fix palette items to use full width.
authorRaphael Moll <ralf@android.com>
Wed, 19 Jan 2011 23:03:04 +0000 (15:03 -0800)
committerRaphael Moll <ralf@android.com>
Wed, 19 Jan 2011 23:06:17 +0000 (15:06 -0800)
Change-Id: Ieb35e80de19f60b2fd724629374ad3a91832f0e9

eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteControl.java

index 30170bb..1349c23 100755 (executable)
@@ -219,6 +219,7 @@ public class PaletteControl extends Composite {
 
         mRoot = new Composite(this, SWT.NONE);
         GridLayoutBuilder.create(mRoot).columns(1).columnsEqual().spacing(0).noMargins();
+        GridDataBuilder.create(mRoot).hGrab().hFill();
 
         if (targetData != null) {
             addGroup(mRoot, "Views", targetData.getLayoutDescriptors().getViewDescriptors());
@@ -304,8 +305,10 @@ public class PaletteControl extends Composite {
 
         Composite group = new Composite(parent, SWT.NONE);
         GridLayoutBuilder.create(group).columns(1).columnsEqual().spacing(0).noMargins();
+        GridDataBuilder.create(group).hFill().hGrab();
 
         Toggle toggle = new Toggle(group, uiName);
+        GridDataBuilder.create(toggle).hFill().hGrab();
 
         for (ElementDescriptor desc : descriptors) {
 
@@ -318,7 +321,7 @@ public class PaletteControl extends Composite {
 
             Item item = new Item(group, this, desc);
             toggle.addItem(item);
-            GridDataBuilder.create(item);
+            GridDataBuilder.create(item).hFill().hGrab();
         }
     }