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

login
register
mail settings
Submitter Shane Wang
Date March 16, 2012, 3:10 p.m.
Message ID <acd17e9087460e8e37930d98fc446fde2809e699.1331910234.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/23681/
State New
Headers show

Comments

Shane Wang - March 16, 2012, 3:10 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(-)
Joshua Lock - March 19, 2012, 11:53 p.m.
On 16/03/12 08:10, Shane Wang wrote:
> 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>

Signed-off-by: Joshua Lock <josh@linux.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(-)
>
> 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 dc0480a..d4ee94e 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

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 dc0480a..d4ee94e 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