summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hobwidget.py
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-03-29 20:54:55 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-29 21:25:55 +0100
commitf717cd64cd53e5e0beb1bd698768cc8099dfacb6 (patch)
treef1a865683e1028496129592bd9ac7161deeaa75f /bitbake/lib/bb/ui/crumbs/hobwidget.py
parentad8fe62cee1889582d5260a415088a3922543c9a (diff)
downloadpoky-f717cd64cd53e5e0beb1bd698768cc8099dfacb6.tar.gz
Hob: some color style changes to make HobTabBar more close to visual design
The change includes: - remove the colors which are not used - change the background of indicators to deep red - change the color style of the texts on HobTabBar, i.e., the tab text and the indicator background are gray when the tab is the current tab; the tab text is white and the indicator background is deep red when the tab is not the current tab. (Bitbake rev: 95acecbf50cee906dca4abd5ce758701e5761668) Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobwidget.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index 413370e39c..8b176c661e 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -558,7 +558,10 @@ class HobTabBar(gtk.DrawingArea):
558 off_y = (self.tab_height - fonth) / 2 558 off_y = (self.tab_height - fonth) / 2
559 x = child["x"] + off_x 559 x = child["x"] + off_x
560 y = child["y"] + off_y 560 y = child["y"] + off_y
561 self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), pangolayout) 561 if not child == self.current_child:
562 self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), pangolayout, gtk.gdk.Color(HobColors.WHITE))
563 else:
564 self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), pangolayout)
562 565
563 def draw_toggled_tab(self, cr): 566 def draw_toggled_tab(self, cr):
564 if not self.current_child: 567 if not self.current_child:
@@ -616,7 +619,10 @@ class HobTabBar(gtk.DrawingArea):
616 y = tab_y + self.tab_height/2 - dest_h/2 619 y = tab_y + self.tab_height/2 - dest_h/2
617 620
618 r = min(dest_w, dest_h)/2 621 r = min(dest_w, dest_h)/2
619 color = cr.set_source_color(gtk.gdk.color_parse(HobColors.ORANGE)) 622 if not child == self.current_child:
623 color = cr.set_source_color(gtk.gdk.color_parse(HobColors.DEEP_RED))
624 else:
625 color = cr.set_source_color(gtk.gdk.color_parse(HobColors.GRAY))
620 # check round back area can contain the text or not 626 # check round back area can contain the text or not
621 back_round_can_contain_width = float(2 * r * 0.707) 627 back_round_can_contain_width = float(2 * r * 0.707)
622 if float(textw) > back_round_can_contain_width: 628 if float(textw) > back_round_can_contain_width:
@@ -635,7 +641,7 @@ class HobTabBar(gtk.DrawingArea):
635 x = x + (dest_w/2)-(textw/2) 641 x = x + (dest_w/2)-(textw/2)
636 y = y + (dest_h/2) - (texth/2) 642 y = y + (dest_h/2) - (texth/2)
637 cr.move_to(x, y) 643 cr.move_to(x, y)
638 self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), layout) 644 self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), layout, gtk.gdk.Color(HobColors.WHITE))
639 645
640 def show_indicator_icon(self, child, number): 646 def show_indicator_icon(self, child, number):
641 child["indicator_show"] = True 647 child["indicator_show"] = True