diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/Icon.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/generic/Icon.c b/generic/Icon.c index 67224e2..b8d003d 100644 --- a/generic/Icon.c +++ b/generic/Icon.c @@ -628,19 +628,16 @@ GetAnchor(Item item, ZnPoint *p) { IconItem icon = (IconItem) item; - int w=0, h=0; if (icon->image == ZnUnspecifiedImage) { *p = *icon->dev; } else { - ZnSizeOfImage(icon->image, &w, &h); - if (item->wi->render) { - Origin2Anchor(&item->item_bounding_box.orig, w, h, anchor, p); - } - else { - Origin2Anchor(icon->dev, w, h, anchor, p); - } + ZnBBox *bbox = &item->item_bounding_box; + Origin2Anchor(&bbox->orig, + bbox->corner.x - bbox->orig.x, + bbox->corner.y - bbox->orig.y, + anchor, p); } } |