Skip to contentSkip to conversation

hob: Buttons width and height are taken for host

PATCH Superseded Ioana Grigoropol 2 participants 3 messages Sep 25, 2012 – Sep 26, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hob: Buttons width and height are taken for host

- removed all set_size_request calls for buttons in order to:
- force autosizing of buttons with regard to the text length
- use host theme default height for buttons
- modified buttons on image details page to have the same height (default host one) and the width of the button with the largest text
- modified Stop button on build details page to have the default height by directly attaching it to the containing table instead of hbox

---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py       |   12 +--
 bitbake/lib/bb/ui/crumbs/hig.py                    |    2 +-
 bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |   15 +--
 bitbake/lib/bb/ui/crumbs/imagedetailspage.py       |  101 ++++++++++++++++----
 bitbake/lib/bb/ui/crumbs/packageselectionpage.py   |    2 +-
 bitbake/lib/bb/ui/crumbs/recipeselectionpage.py    |    2 +-
 6 files changed, 102 insertions(+), 32 deletions(-)
bitbake/lib/bb/ui/crumbs/builddetailspage.py +6 -6
index a927c21..5add31d 100755
@@ -165,7 +165,7 @@ class BuildDetailsPage (HobPage):
         self.builder.handler.build.model.connect_after("row-changed", self.scroll_to_present_row, self.scrolled_view_build.get_vadjustment(), self.build_tv)
 
         self.button_box = gtk.HBox(False, 6)
-        self.back_button = HobAltButton('<< Back')
+        self.back_button = HobAltButton('<< Back')
         self.back_button.connect("clicked", self.back_button_clicked_cb)
         self.button_box.pack_start(self.back_button, expand=False, fill=False)
 
@@ -206,7 +206,7 @@ class BuildDetailsPage (HobPage):
 
         color = HobColors.ERROR
         build_fail_top = gtk.EventBox()
-        build_fail_top.set_size_request(-1, 200)
+        #build_fail_top.set_size_request(-1, 200)
         build_fail_top.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(color))
 
         build_fail_tab = gtk.Table(14, 46, True)
@@ -229,7 +229,7 @@ class BuildDetailsPage (HobPage):
 
         # create button 'Edit packages'
         action_button = HobButton(primary_action)
-        action_button.set_size_request(-1, 40)
+        #action_button.set_size_request(-1, 40)
         action_button.set_tooltip_text("Edit the %s parameters" % actions)
         action_button.connect('clicked', self.failure_primary_action_button_clicked_cb, primary_action)
         build_fail_tab.attach(action_button, 4, 13, 9, 12)
@@ -269,7 +269,7 @@ class BuildDetailsPage (HobPage):
     def add_build_stop_top_bar(self, action, log_file=None):
         color = HobColors.LIGHT_GRAY
         build_stop_top = gtk.EventBox()
-        build_stop_top.set_size_request(-1, 200)
+        #build_stop_top.set_size_request(-1, 200)
         build_stop_top.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(color))
         build_stop_top.set_flags(gtk.CAN_DEFAULT)
         build_stop_top.grab_default()
@@ -288,7 +288,7 @@ class BuildDetailsPage (HobPage):
         build_stop_tab.attach(label, 4, 26, 0, 6)
 
         action_button = HobButton("Edit %s" % action)
-        action_button.set_size_request(-1, 40)
+        #action_button.set_size_request(-1, 40)
         action_button.set_tooltip_text("Edit the %s parameters" % action)
         action_button.connect('clicked', self.stop_primary_action_button_clicked_cb, action)
         build_stop_tab.attach(action_button, 4, 13, 6, 9)
@@ -302,7 +302,7 @@ class BuildDetailsPage (HobPage):
 
         attach_pos = (24 if log_file else 14)
         build_button = HobAltButton("Build new image")
-        build_button.set_size_request(-1, 40)
+        #build_button.set_size_request(-1, 40)
         build_button.set_tooltip_text("Create a new image from scratch")
         build_button.connect('clicked', self.new_image_button_clicked_cb)
         build_stop_tab.attach(build_button, attach_pos, attach_pos + 9, 6, 9)
bitbake/lib/bb/ui/crumbs/hig.py +1 -1
index f304a68..fbce362 100644
@@ -902,7 +902,7 @@ class DeployImageDialog (CrumbsDialog):
                 icon.set_from_pixbuf(pix_buffer)
                 button = gtk.Button("Select Image")
                 button.set_image(icon)
-                button.set_size_request(140, 50)
+                #button.set_size_request(140, 50)
                 table.attach(button, 9, 10, 1, 2, gtk.FILL, 0, 0, 0)
                 button.connect("clicked", self.select_image_button_clicked_cb)
 
bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py +8 -7
index cf7af2b..e1c7a67 100644
@@ -167,13 +167,12 @@ class ImageConfigurationPage (HobPage):
         markup += "dev-manual.html#understanding-and-using-layers\">reference manual</a>."
         self.layer_info_icon = HobInfoButton(markup, self.get_parent())
 
-        self.progress_box = gtk.HBox(False, 6)
+#        self.progress_box = gtk.HBox(False, 6)
         self.progress_bar = HobProgressBar()
-        self.progress_box.pack_start(self.progress_bar, expand=True, fill=True)
+#        self.progress_box.pack_start(self.progress_bar, expand=True, fill=True)
         self.stop_button = HobAltButton("Stop")
         self.stop_button.connect("clicked", self.stop_button_clicked_cb)
-        self.progress_box.pack_end(self.stop_button, expand=False, fill=False)
-
+#        self.progress_box.pack_end(stop_button, expand=False, fill=False)
         self.machine_separator = gtk.HSeparator()
 
     def set_config_machine_layout(self, show_progress_bar = False):
@@ -183,7 +182,9 @@ class ImageConfigurationPage (HobPage):
         self.gtable.attach(self.layer_button, 14, 36, 7, 12)
         self.gtable.attach(self.layer_info_icon, 36, 40, 7, 11)
         if show_progress_bar:
-            self.gtable.attach(self.progress_box, 0, 40, 15, 19)
+            #self.gtable.attach(self.progress_box, 0, 40, 15, 18)
+            self.gtable.attach(self.progress_bar, 0, 37, 15, 18)
+            self.gtable.attach(self.stop_button, 37, 40, 15, 18, 0, 0)
         self.gtable.attach(self.machine_separator, 0, 40, 13, 14)
 
     def create_config_baseimg(self):
@@ -232,14 +233,14 @@ class ImageConfigurationPage (HobPage):
 
         # create button "Build image"
         self.just_bake_button = HobButton("Build image")
-        self.just_bake_button.set_size_request(205, 49)
+        #self.just_bake_button.set_size_request(205, 49)
         self.just_bake_button.set_tooltip_text("Build target image")
         self.just_bake_button.connect("clicked", self.just_bake_button_clicked_cb)
         button_box.pack_end(self.just_bake_button, expand=False, fill=False)
 
         # create button "Edit Image"
         self.edit_image_button = HobAltButton("Edit image")
-        self.edit_image_button.set_size_request(205, 49)
+        #self.edit_image_button.set_size_request(205, 49)
         self.edit_image_button.set_tooltip_text("Edit target image")
         self.edit_image_button.connect("clicked", self.edit_image_button_clicked_cb)
         button_box.pack_end(self.edit_image_button, expand=False, fill=False)
bitbake/lib/bb/ui/crumbs/imagedetailspage.py +85 -16

163 lines not on this page · raw message

bitbake/lib/bb/ui/crumbs/packageselectionpage.py +1 -1
index 7e7828b..cea226e 100755
@@ -146,7 +146,7 @@ class PackageSelectionPage (HobPage):
         self.box_group_area.pack_start(self.button_box, expand=False, fill=False)
 
         self.build_image_button = HobButton('Build image')
-        self.build_image_button.set_size_request(205, 49)
+        #self.build_image_button.set_size_request(205, 49)
         self.build_image_button.set_tooltip_text("Build target image")
         self.build_image_button.set_flags(gtk.CAN_DEFAULT)
         self.build_image_button.grab_default()
bitbake/lib/bb/ui/crumbs/recipeselectionpage.py +1 -1
index f252202..8655c29 100755
@@ -170,7 +170,7 @@ class RecipeSelectionPage (HobPage):
         self.box_group_area.pack_end(button_box, expand=False, fill=False)
 
         self.build_packages_button = HobButton('Build packages')
-        self.build_packages_button.set_size_request(205, 49)
+        #self.build_packages_button.set_size_request(205, 49)
         self.build_packages_button.set_tooltip_text("Build selected recipes into packages")
         self.build_packages_button.set_flags(gtk.CAN_DEFAULT)
         self.build_packages_button.grab_default()
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Ioana,

Quoted 25 lines · On Tuesday 25 September 2012 12:21:05 Ioana Grigoropol wrote:

- removed all set_size_request calls for buttons in order to:
- force autosizing of buttons with regard to the text length
- use host theme default height for buttons
- modified buttons on image details page to have the same height (default host one) and the width of the button with the largest text - modified Stop button on build details page to have the default height by directly attaching it to the containing table instead of hbox

---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py       |   12 +--
 bitbake/lib/bb/ui/crumbs/hig.py                    |    2 +-
 bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |   15 +--
 bitbake/lib/bb/ui/crumbs/imagedetailspage.py       |  101
++++++++++++++++---- bitbake/lib/bb/ui/crumbs/packageselectionpage.py   |  
 2 +-
 bitbake/lib/bb/ui/crumbs/recipeselectionpage.py    |    2 +-
 6 files changed, 102 insertions(+), 32 deletions(-)
(quoted diff) +0 -0

b/bitbake/lib/bb/ui/crumbs/builddetailspage.py index a927c21..5add31d 100755

bitbake/lib/bb/ui/crumbs/builddetailspage.py class BuildDetailsPage (HobPage): · line 170

Quoted 7 lines
bitbake/lib/bb/ui/crumbs/builddetailspage.py +1 -1
@@ -165,7 +165,7 @@ class BuildDetailsPage (HobPage):
         self.builder.handler.build.model.connect_after("row-changed",
 self.scroll_to_present_row, self.scrolled_view_build.get_vadjustment(),
 self.build_tv)
 
         self.button_box = gtk.HBox(False, 6)
-        self.back_button = HobAltButton('&lt;&lt; Back')
+        self.back_button = HobAltButton('<< Back')

I did make this change to avoid a runtime warning due to invalid markup - did you change it back on purpose? If so I don't see it mentioned in the commit message.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#2 lore raw

Hi Paul,

No, it wasn't on purpose. The mark-up was removed on my local repo and was accidentally merged together with the other changes on master. I will resend the patch.

Thanks,
Ioana

Quoted 44 lines · Paul Eggleton

Hi Ioana,

Quoted 25 lines · On Tuesday 25 September 2012 12:21:05 Ioana Grigoropol wrote:

- removed all set_size_request calls for buttons in order to:
- force autosizing of buttons with regard to the text length
- use host theme default height for buttons
- modified buttons on image details page to have the same height (default host one) and the width of the button with the largest text - modified Stop button on build details page to have the default height by directly attaching it to the containing table instead of hbox

---
  bitbake/lib/bb/ui/crumbs/builddetailspage.py       |   12 +--
  bitbake/lib/bb/ui/crumbs/hig.py                    |    2 +-
  bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |   15 +--
  bitbake/lib/bb/ui/crumbs/imagedetailspage.py       |  101
++++++++++++++++---- bitbake/lib/bb/ui/crumbs/packageselectionpage.py   |
  2 +-
  bitbake/lib/bb/ui/crumbs/recipeselectionpage.py    |    2 +-
  6 files changed, 102 insertions(+), 32 deletions(-)
(quoted diff) +0 -0

b/bitbake/lib/bb/ui/crumbs/builddetailspage.py index a927c21..5add31d 100755

bitbake/lib/bb/ui/crumbs/builddetailspage.py class BuildDetailsPage (HobPage): · line 170

Quoted 7 lines
bitbake/lib/bb/ui/crumbs/builddetailspage.py +1 -1
@@ -165,7 +165,7 @@ class BuildDetailsPage (HobPage):
          self.builder.handler.build.model.connect_after("row-changed",
 self.scroll_to_present_row, self.scrolled_view_build.get_vadjustment(),
 self.build_tv)
 
          self.button_box = gtk.HBox(False, 6)
-        self.back_button = HobAltButton('&lt;&lt; Back')
+        self.back_button = HobAltButton('<< Back')

I did make this change to avoid a runtime warning due to invalid markup - did you change it back on purpose? If so I don't see it mentioned in the commit message.

Cheers,
Paul