diff options
author | Liming An <limingx.l.an@intel.com> | 2012-03-29 20:54:56 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-29 21:25:55 +0100 |
commit | 2e6ea8565a50a0efad1287000b967cf80157e742 (patch) | |
tree | f1f8899cb3181fabefa151bae2de18dc8396112b /bitbake/lib/bb/ui | |
parent | f717cd64cd53e5e0beb1bd698768cc8099dfacb6 (diff) | |
download | poky-2e6ea8565a50a0efad1287000b967cf80157e742.tar.gz |
Hob: fixed the 'error' icon source picture and adjusted corresponding showed icon size
The error source picture is not right, so fixed it and adjusted its size.
[YOCTO #2097]
(Bitbake rev: ce680f10037b42831179a4598a69fb39688fb238)
Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobwidget.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py index 8b176c661e..bcc44ccfb9 100644 --- a/bitbake/lib/bb/ui/crumbs/hobwidget.py +++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py | |||
@@ -52,7 +52,7 @@ class hic: | |||
52 | ICON_INFO_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_display.png')) | 52 | ICON_INFO_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_display.png')) |
53 | ICON_INFO_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_hover.png')) | 53 | ICON_INFO_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_hover.png')) |
54 | ICON_INDI_CONFIRM_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/confirmation.png')) | 54 | ICON_INDI_CONFIRM_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/confirmation.png')) |
55 | ICON_INDI_ERROR_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/error.png')) | 55 | ICON_INDI_ERROR_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/denied.png')) |
56 | ICON_INDI_REMOVE_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove.png')) | 56 | ICON_INDI_REMOVE_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove.png')) |
57 | ICON_INDI_REMOVE_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove-hover.png')) | 57 | ICON_INDI_REMOVE_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove-hover.png')) |
58 | ICON_INDI_ADD_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/add.png')) | 58 | ICON_INDI_ADD_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/add.png')) |
@@ -933,6 +933,7 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf): | |||
933 | self.control = RefreshRuningController() | 933 | self.control = RefreshRuningController() |
934 | # add icon checker for make the gtk-icon transfer to hob-icon | 934 | # add icon checker for make the gtk-icon transfer to hob-icon |
935 | self.checker = HobIconChecker() | 935 | self.checker = HobIconChecker() |
936 | self.set_property("stock-size", gtk.ICON_SIZE_DND) | ||
936 | 937 | ||
937 | def get_pixbuf_from_stock_icon(self, widget, stock_id="", size=gtk.ICON_SIZE_DIALOG): | 938 | def get_pixbuf_from_stock_icon(self, widget, stock_id="", size=gtk.ICON_SIZE_DIALOG): |
938 | if widget and stock_id and gtk.icon_factory_lookup_default(stock_id): | 939 | if widget and stock_id and gtk.icon_factory_lookup_default(stock_id): |
@@ -990,7 +991,15 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf): | |||
990 | def on_get_size(self, widget, cell_area): | 991 | def on_get_size(self, widget, cell_area): |
991 | if self.props.icon_name or self.props.pixbuf or self.props.stock_id: | 992 | if self.props.icon_name or self.props.pixbuf or self.props.stock_id: |
992 | w, h = gtk.icon_size_lookup(self.props.stock_size) | 993 | w, h = gtk.icon_size_lookup(self.props.stock_size) |
993 | return 0, 0, w, h | 994 | calc_width = self.get_property("xpad") * 2 + w |
995 | calc_height = self.get_property("ypad") * 2 + h | ||
996 | x_offset = 0 | ||
997 | y_offset = 0 | ||
998 | if cell_area and w > 0 and h > 0: | ||
999 | x_offset = self.get_property("xalign") * (cell_area.width - calc_width - self.get_property("xpad")) | ||
1000 | y_offset = self.get_property("yalign") * (cell_area.height - calc_height - self.get_property("ypad")) | ||
1001 | |||
1002 | return x_offset, y_offset, w, h | ||
994 | 1003 | ||
995 | return 0, 0, 0, 0 | 1004 | return 0, 0, 0, 0 |
996 | 1005 | ||