Patchwork [bitbake-devel,09/11] Hob: change HobNoteBook tab edge color from green to gray

login
register
mail settings
Submitter Shane Wang
Date March 20, 2012, 2:41 p.m.
Message ID <8e454749e7f535cf43544eeb167c90632e89cfb0.1332254194.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/23885/
State New
Headers show

Comments

Shane Wang - March 20, 2012, 2:41 p.m.
From: Liming An <limingx.l.an@intel.com>

To change the notebook tab pressed edge color from green to gray.

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 bitbake/lib/bb/ui/crumbs/hobcolor.py  |    2 ++
 bitbake/lib/bb/ui/crumbs/hobwidget.py |   13 ++++++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/hobcolor.py b/bitbake/lib/bb/ui/crumbs/hobcolor.py
index 402f022..f767d22 100644
--- a/bitbake/lib/bb/ui/crumbs/hobcolor.py
+++ b/bitbake/lib/bb/ui/crumbs/hobcolor.py
@@ -25,6 +25,8 @@  class HobColors:
     PALE_RED     = "#ffaaaa"
     GRAY         = "#aaaaaa"
     LIGHT_GRAY   = "#dddddd"
+    DEEP_GRAY    = "#7c7c77"
+    SLIGHT_DARK  = "#5f5f5f"
     DARK         = "#3c3b37"
     BLACK        = "#000000"
     LIGHT_ORANGE = "#f7a787"
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index bc27cd1..a5c52f7 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -496,16 +496,19 @@  class HobTabBar(gtk.DrawingArea):
 
         r = height / 10
         if self.tab_pressed == True:
-            for xoff, yoff in [(1, 0), (2, 0)]:
-                cr.set_source_color(gtk.gdk.color_parse(HobColors.PALE_GREEN))
+            for xoff, yoff, c1, c2 in [(1, 0, HobColors.SLIGHT_DARK, HobColors.DARK), (2, 0, HobColors.GRAY, HobColors.LIGHT_GRAY)]:
+                cr.set_source_color(gtk.gdk.color_parse(c1))
+                cr.move_to(x + xoff, y + height + yoff)
+                cr.line_to(x + xoff, r + yoff)
+                cr.arc(x + r + xoff, y + r + yoff, r, math.pi, 1.5*math.pi)
                 cr.move_to(x + r + xoff, y + yoff)
                 cr.line_to(x + width - r + xoff, y + yoff)
-                cr.arc(x + width - r+ xoff, y + r + yoff, r, 1.5*math.pi, 2*math.pi)
+                cr.arc(x + width - r + xoff, y + r + yoff, r, 1.5*math.pi, 2*math.pi)
+                cr.stroke()
+                cr.set_source_color(gtk.gdk.color_parse(c2))
                 cr.move_to(x + width + xoff, r + yoff)
                 cr.line_to(x + width + xoff, y + height + yoff)
                 cr.line_to(x + xoff, y + height + yoff)
-                cr.line_to(x + xoff, r + yoff)
-                cr.arc(x + r + xoff, y + r + yoff, r, math.pi, 1.5*math.pi)
                 cr.stroke()
             x = x + 2
             y = y + 2