Patchwork [bitbake-devel,5/9] lib/bb/ui/crumbs: add colour for HobAltButton per visual design

login
register
mail settings
Submitter Joshua Lock
Date March 22, 2012, 11:31 p.m.
Message ID <573593c0c86b47a0ccec5a3c87c96eaebd05817d.1332458487.git.josh@linux.intel.com>
Download mbox | patch
Permalink /patch/24211/
State Accepted
Commit c9f61765216a013c7ebc02157ea47c3478252e7c
Headers show

Comments

Joshua Lock - March 22, 2012, 11:31 p.m.
The visual design calls for the alternative button to have a pale blue
colour.

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

Patch

diff --git a/lib/bb/ui/crumbs/hobcolor.py b/lib/bb/ui/crumbs/hobcolor.py
index f767d22..4595dc1 100644
--- a/lib/bb/ui/crumbs/hobcolor.py
+++ b/lib/bb/ui/crumbs/hobcolor.py
@@ -31,6 +31,7 @@  class HobColors:
     BLACK        = "#000000"
     LIGHT_ORANGE = "#f7a787"
     YELLOW       = "#ffff00"
+    PALE_BLUE    = "#53b8ff"
 
     OK = WHITE
     RUNNING = PALE_GREEN
diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py
index e8549a1..b93e9d4 100644
--- a/lib/bb/ui/crumbs/hobwidget.py
+++ b/lib/bb/ui/crumbs/hobwidget.py
@@ -200,8 +200,9 @@  class HobAltButton(gtk.Button):
     """
     A gtk.Button subclass which has no relief, and so is more discrete
     """
-    def __init__(self, label=None):
-        gtk.Button.__init__(self, label)
+    def __init__(self, label):
+        gtk.Button.__init__(self, "<span color='%s'><b>%s</b></span>" % (HobColors.PALE_BLUE, gobject.markup_escape_text(label)))
+        self.child.set_use_markup(True)
         self.set_relief(gtk.RELIEF_NONE)
 
 class HobImageButton(gtk.Button):