Patchwork [bitbake-devel,17/32] hig: try to avoid setting explicit dialogue sizes

login
register
mail settings
Submitter Shane Wang
Date Feb. 29, 2012, 2:15 p.m.
Message ID <eb98b6eb22a5eb8531923722f0c8afb9e24ccb48.1330523904.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/22455/
State New
Headers show

Comments

Shane Wang - Feb. 29, 2012, 2:15 p.m.
Gtk+ does a good job of creating dialogues which fit all of the packed
widgets and respect the spacing. Let it do its job.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 bitbake/lib/bb/ui/crumbs/hig.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index ec9dbec..6776b3d 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -468,8 +468,6 @@  class AdvancedSettingDialog (CrumbsDialog):
         self.connect("response", self.response_cb)
 
     def create_visual_elements(self):
-        self.set_size_request(500, 500)
-
         self.nb = gtk.Notebook()
         self.nb.set_show_tabs(True)
         self.nb.append_page(self.create_image_types_page(), gtk.Label("Image types"))
@@ -700,8 +698,6 @@  class DeployImageDialog (CrumbsDialog):
         self.connect("response", self.response_cb)
 
     def create_visual_elements(self):
-        self.set_default_size(500, 250)
-
         label = gtk.Label()
         label.set_alignment(0.0, 0.5)
         markup = "<span font_desc='12'>The image to be written into usb drive:</span>"
@@ -947,7 +943,6 @@  class LayerSelectionDialog (CrumbsDialog):
         self.connect("response", self.response_cb)
                 
     def create_visual_elements(self):
-        self.set_default_size(400, 250)
         hbox_top = gtk.HBox()
         self.vbox.pack_start(hbox_top, expand=False, fill=False)
 
@@ -964,6 +959,7 @@  class LayerSelectionDialog (CrumbsDialog):
         hbox_top.pack_end(image, expand=False, fill=False)
 
         layer_widget, self.layer_store = self.gen_layer_widget(self.split_model, self.layers, self.all_layers, self, None)
+        layer_widget.set_size_request(-1, 180)
 
         self.vbox.pack_start(layer_widget, expand=True, fill=True)
 
@@ -1031,6 +1027,7 @@  class ImageSelectionDialog (CrumbsDialog):
 
     def create_visual_elements(self):
         hbox = gtk.HBox(False, 6)
+
         self.vbox.pack_start(hbox, expand=False, fill=False)
 
         entry = gtk.Entry()