All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] A few more Hob tweaks
@ 2012-03-29 22:28 Joshua Lock
  2012-03-29 22:28 ` [PATCH 1/3] Hob: tweak font sizes and layout Joshua Lock
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Joshua Lock @ 2012-03-29 22:28 UTC (permalink / raw)
  To: bitbake-devel

Here are a few more tweaks for Hob based on design team feedback.

Please review for inclusion.

Thanks,
Joshua

The following changes since commit 8fed4fdf4bbbc9ef036ff96755c0bfe15c3a9dd0:

  knotty: Add back getTasks() call to ensure we don't repeat messges (2012-03-29 21:38:25 +0100)

are available in the git repository at:
  git://github.com/incandescant/bitbake josh/hob
  https://github.com/incandescant/bitbake/tree/josh/hob

Joshua Lock (3):
  Hob: tweak font sizes and layout
  lib/bb/ui/crumbs/hobpages: change title from HOB to Hob
  lib/bb/ui/crumbs/hoblistmodel: fix sorting of RecipeListModel

 lib/bb/ui/crumbs/hoblistmodel.py           |    8 +----
 lib/bb/ui/crumbs/hobpages.py               |    8 +++---
 lib/bb/ui/crumbs/hobwidget.py              |    8 +++---
 lib/bb/ui/crumbs/imageconfigurationpage.py |   36 ++++++++++++++--------------
 4 files changed, 28 insertions(+), 32 deletions(-)

-- 
1.7.7.6




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] Hob: tweak font sizes and layout
  2012-03-29 22:28 [PATCH 0/3] A few more Hob tweaks Joshua Lock
@ 2012-03-29 22:28 ` Joshua Lock
  2012-03-29 22:28 ` [PATCH 2/3] lib/bb/ui/crumbs/hobpages: change title from HOB to Hob Joshua Lock
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Joshua Lock @ 2012-03-29 22:28 UTC (permalink / raw)
  To: bitbake-devel

Switch to proportional font sizes and tweak padding and layout based on
feedback from design team.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/hobpages.py               |    6 ++--
 lib/bb/ui/crumbs/hobwidget.py              |    8 +++---
 lib/bb/ui/crumbs/imageconfigurationpage.py |   36 ++++++++++++++--------------
 3 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobpages.py b/lib/bb/ui/crumbs/hobpages.py
index 8ea39e7..024737d 100755
--- a/lib/bb/ui/crumbs/hobpages.py
+++ b/lib/bb/ui/crumbs/hobpages.py
@@ -59,7 +59,7 @@ class HobPage (gtk.VBox):
         hbox = gtk.HBox()
 
         label = gtk.Label()
-        label.set_markup("<span font_desc=\'14\'>%s</span>" % self.title)
+        label.set_markup("<span size='x-large'>%s</span>" % self.title)
         hbox.pack_start(label, expand=False, fill=False, padding=20)
 
         if widget:
@@ -69,8 +69,8 @@ class HobPage (gtk.VBox):
 
         return eventbox
 
-    def span_tag(self, px="12px", weight="normal", forground="#1c1c1c"):
-        span_tag = "weight=\'%s\' foreground=\'%s\' font_desc=\'%s\'" % (weight, forground, px)
+    def span_tag(self, size="medium", weight="normal", forground="#1c1c1c"):
+        span_tag = "weight='%s' foreground='%s' size='%s'" % (weight, forground, size)
         return span_tag
 
     def append_toolbar_button(self, toolbar, buttonname, icon_disp, icon_hovor, tip, cb):
diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py
index bcc44cc..9625c6d 100644
--- a/lib/bb/ui/crumbs/hobwidget.py
+++ b/lib/bb/ui/crumbs/hobwidget.py
@@ -254,7 +254,7 @@ class HobAltButton(gtk.Button):
             colour = HobColors.PALE_BLUE
         else:
             colour = HobColors.LIGHT_GRAY
-        button.set_label("<span color='%s'><b>%s</b></span>" % (colour, gobject.markup_escape_text(button.text)))
+        button.set_label("<span size='large' color='%s'><b>%s</b></span>" % (colour, gobject.markup_escape_text(button.text)))
         button.child.set_use_markup(True)
 
     @staticmethod
@@ -281,7 +281,7 @@ class HobImageButton(gtk.Button):
         self.icon_path = icon_path
         self.hover_icon_path = hover_icon_path
 
-        hbox = gtk.HBox(False, 6)
+        hbox = gtk.HBox(False, 10)
         hbox.show()
         self.add(hbox)
         self.icon = gtk.Image()
@@ -295,10 +295,10 @@ class HobImageButton(gtk.Button):
         label = gtk.Label()
         label.set_alignment(0.0, 0.5)
         colour = soften_color(label)
-        mark = "<span size='larger'>%s</span>\n<span fgcolor='%s'>%s</span>" % (primary_text, colour, secondary_text)
+        mark = "<span size='x-large'>%s</span>\n<span size='medium' fgcolor='%s' weight='ultralight'>%s</span>" % (primary_text, colour, secondary_text)
         label.set_markup(mark)
         label.show()
-        hbox.pack_start(label, True, True, 6)
+        hbox.pack_start(label, True, True, 0)
 
     def set_hover_icon_cb(self, widget, event):
         self.icon.set_from_file(self.hover_icon_path)
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index 8914b1c..30f8979 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -133,13 +133,13 @@ class ImageConfigurationPage (HobPage):
     def create_config_machine(self):
         self.machine_title = gtk.Label()
         self.machine_title.set_alignment(0.0, 0.5)
-        mark = "<span %s>Select a machine</span>" % self.span_tag('24px', 'bold')
+        mark = "<span %s>Select a machine</span>" % self.span_tag('x-large', 'bold')
         self.machine_title.set_markup(mark)
 
         self.machine_title_desc = gtk.Label()
-        self.machine_title_desc.set_alignment(0, 0.5)
+        self.machine_title_desc.set_alignment(0.0, 0.5)
         mark = ("<span %s>This is the profile of the target machine for which you"
-        " are building the image.\n</span>") % (self.span_tag(px='14px'))
+        " are building the image.\n</span>") % (self.span_tag('medium'))
         self.machine_title_desc.set_markup(mark)
 
         self.machine_combo = gtk.combo_box_new_text()
@@ -170,31 +170,31 @@ class ImageConfigurationPage (HobPage):
     def set_config_machine_layout(self, show_progress_bar = False):
         self.gtable.attach(self.machine_title, 0, 40, 0, 4)
         self.gtable.attach(self.machine_title_desc, 0, 40, 4, 6)
-        self.gtable.attach(self.machine_combo, 0, 12, 6, 9)
-        self.gtable.attach(self.layer_button, 15, 36, 6, 11)
-        self.gtable.attach(self.layer_info_icon, 36, 40, 6, 10)
+        self.gtable.attach(self.machine_combo, 0, 12, 7, 10)
+        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, 13, 17)
-        self.gtable.attach(self.machine_separator, 0, 40, 12, 13)
+            self.gtable.attach(self.progress_box, 0, 40, 15, 19)
+        self.gtable.attach(self.machine_separator, 0, 40, 13, 14)
 
     def create_config_baseimg(self):
         self.image_title = gtk.Label()
         self.image_title.set_alignment(0, 1.0)
-        mark = "<span %s>Select a base image</span>" % self.span_tag('24px', 'bold')
+        mark = "<span %s>Select a base image</span>" % self.span_tag('x-large', 'bold')
         self.image_title.set_markup(mark)
 
         self.image_title_desc = gtk.Label()
         self.image_title_desc.set_alignment(0, 0.5)
         mark = ("<span %s>Base images are a starting point for the type of image you want. "
                 "You can build them as \n"
-                "they are or customize them to your specific needs.\n</span>") % self.span_tag('14px')
+                "they are or customize them to your specific needs.\n</span>") % self.span_tag('medium')
         self.image_title_desc.set_markup(mark)
 
         self.image_combo = gtk.combo_box_new_text()
         self.image_combo_id = self.image_combo.connect("changed", self.image_combo_changed_cb)
 
         self.image_desc = gtk.Label()
-        self.image_desc.set_alignment(0, 0.5)
+        self.image_desc.set_alignment(0.0, 0.5)
         self.image_desc.set_line_wrap(True)
 
         # button to view recipes
@@ -216,15 +216,15 @@ class ImageConfigurationPage (HobPage):
         self.image_separator = gtk.HSeparator()
 
     def set_config_baseimg_layout(self):
-        self.gtable.attach(self.image_title, 0, 40, 13, 17)
-        self.gtable.attach(self.image_title_desc, 0, 40, 18, 23)
-        self.gtable.attach(self.image_combo, 0, 12, 24, 27)
-        self.gtable.attach(self.image_desc, 14, 38, 24, 29)
+        self.gtable.attach(self.image_title, 0, 40, 15, 17)
+        self.gtable.attach(self.image_title_desc, 0, 40, 18, 22)
+        self.gtable.attach(self.image_combo, 0, 12, 23, 26)
+        self.gtable.attach(self.image_desc, 13, 38, 23, 28)
         self.gtable.attach(self.image_separator, 0, 40, 35, 36)
 
     def set_rcppkg_layout(self):
-        self.gtable.attach(self.view_recipes_button, 0, 20, 30, 35)
-        self.gtable.attach(self.view_packages_button, 20, 40, 30, 35)
+        self.gtable.attach(self.view_recipes_button, 0, 20, 28, 33)
+        self.gtable.attach(self.view_packages_button, 20, 40, 28, 33)
 
     def create_config_build_button(self):
         # Create the "Build packages" and "Build image" buttons at the bottom
@@ -295,7 +295,7 @@ class ImageConfigurationPage (HobPage):
         image_iter = self.builder.recipe_model.get_iter(image_path)
         selected_packages = self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_INSTALL).split()
 
-        mark = ("<span %s>%s</span>\n") % (self.span_tag('14px'), self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_DESC))
+        mark = ("<span %s>%s</span>\n") % (self.span_tag('small'), self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_DESC))
         self.image_desc.set_markup(mark)
 
         self.builder.recipe_model.reset()
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] lib/bb/ui/crumbs/hobpages: change title from HOB to Hob
  2012-03-29 22:28 [PATCH 0/3] A few more Hob tweaks Joshua Lock
  2012-03-29 22:28 ` [PATCH 1/3] Hob: tweak font sizes and layout Joshua Lock
@ 2012-03-29 22:28 ` Joshua Lock
  2012-03-29 22:28 ` [PATCH 3/3] lib/bb/ui/crumbs/hoblistmodel: fix sorting of RecipeListModel Joshua Lock
  2012-03-30 16:21 ` [PATCH 0/3] A few more Hob tweaks Richard Purdie
  3 siblings, 0 replies; 5+ messages in thread
From: Joshua Lock @ 2012-03-29 22:28 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/hobpages.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobpages.py b/lib/bb/ui/crumbs/hobpages.py
index 024737d..d8e59c4 100755
--- a/lib/bb/ui/crumbs/hobpages.py
+++ b/lib/bb/ui/crumbs/hobpages.py
@@ -35,7 +35,7 @@ class HobPage (gtk.VBox):
         self.builder_width, self.builder_height = self.builder.size_request()
 
         if not title:
-            self.title = "HOB -- Image Creator"
+            self.title = "Hob -- Image Creator"
         else:
             self.title = title
 
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] lib/bb/ui/crumbs/hoblistmodel: fix sorting of RecipeListModel
  2012-03-29 22:28 [PATCH 0/3] A few more Hob tweaks Joshua Lock
  2012-03-29 22:28 ` [PATCH 1/3] Hob: tweak font sizes and layout Joshua Lock
  2012-03-29 22:28 ` [PATCH 2/3] lib/bb/ui/crumbs/hobpages: change title from HOB to Hob Joshua Lock
@ 2012-03-29 22:28 ` Joshua Lock
  2012-03-30 16:21 ` [PATCH 0/3] A few more Hob tweaks Richard Purdie
  3 siblings, 0 replies; 5+ messages in thread
From: Joshua Lock @ 2012-03-29 22:28 UTC (permalink / raw)
  To: bitbake-devel

Sort in ascending order on the recipe name (A-Z) and unset the default sort
function so that there's no third (unsorted) state.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/hoblistmodel.py |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index bfd49bd..a09c7c7 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -471,11 +471,6 @@ class RecipeListModel(gtk.ListStore):
 
         return True
 
-    def sort_func(self, model, iter1, iter2):
-        val1 = model.get_value(iter1, RecipeListModel.COL_NAME)
-        val2 = model.get_value(iter2, RecipeListModel.COL_NAME)
-        return val1 > val2
-
     """
     Create, if required, and return a filtered gtk.TreeModelSort
     containing only the items which are items specified by filter
@@ -485,7 +480,8 @@ class RecipeListModel(gtk.ListStore):
         model.set_visible_func(self.tree_model_filter, filter)
 
         sort = gtk.TreeModelSort(model)
-        sort.set_default_sort_func(self.sort_func)
+        sort.set_sort_column_id(RecipeListModel.COL_NAME, gtk.SORT_ASCENDING)
+        sort.set_default_sort_func(None)
         return sort
 
     def convert_vpath_to_path(self, view_model, view_path):
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] A few more Hob tweaks
  2012-03-29 22:28 [PATCH 0/3] A few more Hob tweaks Joshua Lock
                   ` (2 preceding siblings ...)
  2012-03-29 22:28 ` [PATCH 3/3] lib/bb/ui/crumbs/hoblistmodel: fix sorting of RecipeListModel Joshua Lock
@ 2012-03-30 16:21 ` Richard Purdie
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2012-03-30 16:21 UTC (permalink / raw)
  To: Joshua Lock; +Cc: bitbake-devel

On Thu, 2012-03-29 at 15:28 -0700, Joshua Lock wrote:
> Here are a few more tweaks for Hob based on design team feedback.
> 
> Please review for inclusion.
> 
> Thanks,
> Joshua
> 
> The following changes since commit 8fed4fdf4bbbc9ef036ff96755c0bfe15c3a9dd0:
> 
>   knotty: Add back getTasks() call to ensure we don't repeat messges (2012-03-29 21:38:25 +0100)
> 
> are available in the git repository at:
>   git://github.com/incandescant/bitbake josh/hob
>   https://github.com/incandescant/bitbake/tree/josh/hob
> 
> Joshua Lock (3):
>   Hob: tweak font sizes and layout
>   lib/bb/ui/crumbs/hobpages: change title from HOB to Hob
>   lib/bb/ui/crumbs/hoblistmodel: fix sorting of RecipeListModel

Merged to master, thanks.

Richard




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-30 16:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-29 22:28 [PATCH 0/3] A few more Hob tweaks Joshua Lock
2012-03-29 22:28 ` [PATCH 1/3] Hob: tweak font sizes and layout Joshua Lock
2012-03-29 22:28 ` [PATCH 2/3] lib/bb/ui/crumbs/hobpages: change title from HOB to Hob Joshua Lock
2012-03-29 22:28 ` [PATCH 3/3] lib/bb/ui/crumbs/hoblistmodel: fix sorting of RecipeListModel Joshua Lock
2012-03-30 16:21 ` [PATCH 0/3] A few more Hob tweaks Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.