diff options
| author | Shane Wang <shane.wang@intel.com> | 2012-03-29 20:54:55 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-29 21:25:55 +0100 |
| commit | f717cd64cd53e5e0beb1bd698768cc8099dfacb6 (patch) | |
| tree | f1a865683e1028496129592bd9ac7161deeaa75f /bitbake | |
| parent | ad8fe62cee1889582d5260a415088a3922543c9a (diff) | |
| download | poky-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')
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobcolor.py | 4 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobwidget.py | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobcolor.py b/bitbake/lib/bb/ui/crumbs/hobcolor.py index 74a9d46378..e10f546e52 100644 --- a/bitbake/lib/bb/ui/crumbs/hobcolor.py +++ b/bitbake/lib/bb/ui/crumbs/hobcolor.py | |||
| @@ -25,13 +25,11 @@ class HobColors: | |||
| 25 | PALE_RED = "#ffaaaa" | 25 | PALE_RED = "#ffaaaa" |
| 26 | GRAY = "#aaaaaa" | 26 | GRAY = "#aaaaaa" |
| 27 | LIGHT_GRAY = "#dddddd" | 27 | LIGHT_GRAY = "#dddddd" |
| 28 | DEEP_GRAY = "#7c7c77" | ||
| 29 | SLIGHT_DARK = "#5f5f5f" | 28 | SLIGHT_DARK = "#5f5f5f" |
| 30 | DARK = "#3c3b37" | 29 | DARK = "#3c3b37" |
| 31 | BLACK = "#000000" | 30 | BLACK = "#000000" |
| 32 | LIGHT_ORANGE = "#f7a787" | ||
| 33 | YELLOW = "#ffff00" | ||
| 34 | PALE_BLUE = "#53b8ff" | 31 | PALE_BLUE = "#53b8ff" |
| 32 | DEEP_RED = "#aa3e3e" | ||
| 35 | 33 | ||
| 36 | OK = WHITE | 34 | OK = WHITE |
| 37 | RUNNING = PALE_GREEN | 35 | RUNNING = PALE_GREEN |
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 |
