aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorLiming An <limingx.l.an@intel.com>2012-03-29 20:54:56 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-29 21:25:55 +0100
commit2e6ea8565a50a0efad1287000b967cf80157e742 (patch)
treef1f8899cb3181fabefa151bae2de18dc8396112b /bitbake
parentf717cd64cd53e5e0beb1bd698768cc8099dfacb6 (diff)
downloadopenembedded-core-contrib-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')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py13
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:
ICON_INFO_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_display.png'))
ICON_INFO_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_hover.png'))
ICON_INDI_CONFIRM_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/confirmation.png'))
- ICON_INDI_ERROR_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/error.png'))
+ ICON_INDI_ERROR_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/denied.png'))
ICON_INDI_REMOVE_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove.png'))
ICON_INDI_REMOVE_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove-hover.png'))
ICON_INDI_ADD_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/add.png'))
@@ -933,6 +933,7 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf):
self.control = RefreshRuningController()
# add icon checker for make the gtk-icon transfer to hob-icon
self.checker = HobIconChecker()
+ self.set_property("stock-size", gtk.ICON_SIZE_DND)
def get_pixbuf_from_stock_icon(self, widget, stock_id="", size=gtk.ICON_SIZE_DIALOG):
if widget and stock_id and gtk.icon_factory_lookup_default(stock_id):
@@ -990,7 +991,15 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf):
def on_get_size(self, widget, cell_area):
if self.props.icon_name or self.props.pixbuf or self.props.stock_id:
w, h = gtk.icon_size_lookup(self.props.stock_size)
- return 0, 0, w, h
+ calc_width = self.get_property("xpad") * 2 + w
+ calc_height = self.get_property("ypad") * 2 + h
+ x_offset = 0
+ y_offset = 0
+ if cell_area and w > 0 and h > 0:
+ x_offset = self.get_property("xalign") * (cell_area.width - calc_width - self.get_property("xpad"))
+ y_offset = self.get_property("yalign") * (cell_area.height - calc_height - self.get_property("ypad"))
+
+ return x_offset, y_offset, w, h
return 0, 0, 0, 0