Index: uspace/lib/ui/src/image.c
===================================================================
--- uspace/lib/ui/src/image.c	(revision 12008adfe6b01422d866fedbe63b45f8cdb5d9a9)
+++ uspace/lib/ui/src/image.c	(revision 7b1bfdb17fcc330a202d54d51981d796f7af52f7)
@@ -124,4 +124,14 @@
 }
 
+/** Set image flags.
+ *
+ * @param image Image
+ * @param flags Flags
+ */
+void ui_image_set_flags(ui_image_t *image, ui_image_flags_t flags)
+{
+	image->flags = flags;
+}
+
 /** Paint image.
  *
@@ -131,9 +141,27 @@
 errno_t ui_image_paint(ui_image_t *image)
 {
+	gfx_rect_t irect;
 	gfx_rect_t srect;
 	gfx_coord2_t offs;
+	errno_t rc;
+
+	if ((image->flags & ui_imgf_frame) != 0) {
+		rc = ui_paint_bevel(image->res->gc, &image->rect,
+		    image->res->btn_frame_color, image->res->btn_frame_color,
+		    1, NULL);
+		if (rc != EOK)
+			return rc;
+	}
 
 	if (image->bitmap == NULL)
 		return EOK;
+
+	irect = image->rect;
+	if ((image->flags & ui_imgf_frame) != 0) {
+		irect.p0.x++;
+		irect.p0.y++;
+		irect.p1.x--;
+		irect.p1.y--;
+	}
 
 	/*
@@ -141,13 +169,14 @@
 	 * we need to subtract it.
 	 */
-	offs.x = image->rect.p0.x - image->brect.p0.x;
-	offs.y = image->rect.p0.y - image->brect.p0.y;
+	offs.x = irect.p0.x - image->brect.p0.x;
+	offs.y = irect.p0.y - image->brect.p0.y;
 
 	/*
-	 * Transalte image rectangle back to bitmap coordinate space.
+	 * Translate image rectangle back to bitmap coordinate space.
 	 * Thus the bitmap will be clipped to the image rectangle.
 	 */
-	gfx_rect_rtranslate(&offs, &image->rect, &srect);
+	gfx_rect_rtranslate(&offs, &irect, &srect);
 	return gfx_bitmap_render(image->bitmap, &srect, &offs);
+
 }
 
