Index: uspace/lib/ui/include/types/ui/checkbox.h
===================================================================
--- uspace/lib/ui/include/types/ui/checkbox.h	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
+++ uspace/lib/ui/include/types/ui/checkbox.h	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2020 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Check box
+ */
+
+#ifndef _UI_TYPES_CHECKBOX_H
+#define _UI_TYPES_CHECKBOX_H
+
+#include <stdbool.h>
+
+struct ui_checkbox;
+typedef struct ui_checkbox ui_checkbox_t;
+
+/** Check box callbacks */
+typedef struct ui_checkbox_cb {
+	void (*switched)(ui_checkbox_t *, void *, bool);
+} ui_checkbox_cb_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/include/ui/checkbox.h
===================================================================
--- uspace/lib/ui/include/ui/checkbox.h	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
+++ uspace/lib/ui/include/ui/checkbox.h	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2020 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Check box
+ */
+
+#ifndef _UI_CHECKBOX_H
+#define _UI_CHECKBOX_H
+
+#include <errno.h>
+#include <gfx/coord.h>
+#include <io/pos_event.h>
+#include <types/ui/checkbox.h>
+#include <types/ui/control.h>
+#include <types/ui/event.h>
+#include <types/ui/resource.h>
+#include <stdbool.h>
+
+extern errno_t ui_checkbox_create(ui_resource_t *, const char *,
+    ui_checkbox_t **);
+extern void ui_checkbox_destroy(ui_checkbox_t *);
+extern ui_control_t *ui_checkbox_ctl(ui_checkbox_t *);
+extern void ui_checkbox_set_cb(ui_checkbox_t *, ui_checkbox_cb_t *, void *);
+extern void ui_checkbox_set_rect(ui_checkbox_t *, gfx_rect_t *);
+extern errno_t ui_checkbox_paint(ui_checkbox_t *);
+extern void ui_checkbox_press(ui_checkbox_t *);
+extern void ui_checkbox_release(ui_checkbox_t *);
+extern void ui_checkbox_enter(ui_checkbox_t *);
+extern void ui_checkbox_leave(ui_checkbox_t *);
+extern void ui_checkbox_switched(ui_checkbox_t *);
+extern ui_evclaim_t ui_checkbox_pos_event(ui_checkbox_t *, pos_event_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/include/ui/paint.h
===================================================================
--- uspace/lib/ui/include/ui/paint.h	(revision d1582b502edcb7bfeef771a2019538f265e7e27c)
+++ uspace/lib/ui/include/ui/paint.h	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -40,7 +40,9 @@
 #include <gfx/color.h>
 #include <gfx/coord.h>
+#include <types/ui/resource.h>
 
 errno_t ui_paint_bevel(gfx_context_t *, gfx_rect_t *, gfx_color_t *,
     gfx_color_t *, gfx_coord_t, gfx_rect_t *);
+errno_t ui_paint_inset_frame(ui_resource_t *, gfx_rect_t *, gfx_rect_t *);
 
 #endif
Index: uspace/lib/ui/meson.build
===================================================================
--- uspace/lib/ui/meson.build	(revision d1582b502edcb7bfeef771a2019538f265e7e27c)
+++ uspace/lib/ui/meson.build	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -29,4 +29,5 @@
 deps = [ 'gfx', 'gfxfont', 'memgfx', 'display' ]
 src = files(
+	'src/checkbox.c',
 	'src/control.c',
 	'src/dummygc.c',
@@ -44,4 +45,5 @@
 
 test_src = files(
+	'test/checkbox.c',
 	'test/control.c',
 	'test/entry.c',
Index: uspace/lib/ui/private/checkbox.h
===================================================================
--- uspace/lib/ui/private/checkbox.h	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
+++ uspace/lib/ui/private/checkbox.h	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2020 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Check box structure
+ *
+ */
+
+#ifndef _UI_PRIVATE_CHECKBOX_H
+#define _UI_PRIVATE_CHECKBOX_H
+
+#include <gfx/coord.h>
+#include <stdbool.h>
+
+/** Actual structure of check box.
+ *
+ * This is private to libui.
+ */
+struct ui_checkbox {
+	/** Base control object */
+	struct ui_control *control;
+	/** UI resource */
+	struct ui_resource *res;
+	/** Callbacks */
+	struct ui_checkbox_cb *cb;
+	/** Callback argument */
+	void *arg;
+	/** Check box rectangle */
+	gfx_rect_t rect;
+	/** Caption */
+	const char *caption;
+	/** Check box is checked */
+	bool checked;
+	/** Check box is currently held down */
+	bool held;
+	/** Pointer is currently inside */
+	bool inside;
+};
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/private/resource.h
===================================================================
--- uspace/lib/ui/private/resource.h	(revision d1582b502edcb7bfeef771a2019538f265e7e27c)
+++ uspace/lib/ui/private/resource.h	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -92,4 +92,6 @@
 	/** Entry (text entry, checkbox, raido button) background color */
 	gfx_color_t *entry_bg_color;
+	/** Entry (text entry, checkbox, raido button) active background color */
+	gfx_color_t *entry_act_bg_color;
 };
 
Index: uspace/lib/ui/src/checkbox.c
===================================================================
--- uspace/lib/ui/src/checkbox.c	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
+++ uspace/lib/ui/src/checkbox.c	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -0,0 +1,384 @@
+/*
+ * Copyright (c) 2020 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Check box
+ */
+
+#include <errno.h>
+#include <gfx/color.h>
+#include <gfx/context.h>
+#include <gfx/render.h>
+#include <gfx/text.h>
+#include <io/pos_event.h>
+#include <stdlib.h>
+#include <str.h>
+#include <ui/control.h>
+#include <ui/paint.h>
+#include <ui/checkbox.h>
+#include "../private/checkbox.h"
+#include "../private/resource.h"
+
+enum {
+	checkbox_box_w = 16,
+	checkbox_box_h = 16,
+	checkbox_label_margin = 8,
+};
+
+static void ui_checkbox_ctl_destroy(void *);
+static errno_t ui_checkbox_ctl_paint(void *);
+static ui_evclaim_t ui_checkbox_ctl_pos_event(void *, pos_event_t *);
+
+/** Check box control ops */
+ui_control_ops_t ui_checkbox_ops = {
+	.destroy = ui_checkbox_ctl_destroy,
+	.paint = ui_checkbox_ctl_paint,
+	.pos_event = ui_checkbox_ctl_pos_event
+};
+
+/** Create new check box.
+ *
+ * @param resource UI resource
+ * @param caption Caption
+ * @param rcheckbox Place to store pointer to new check box
+ * @return EOK on success, ENOMEM if out of memory
+ */
+errno_t ui_checkbox_create(ui_resource_t *resource, const char *caption,
+    ui_checkbox_t **rcheckbox)
+{
+	ui_checkbox_t *checkbox;
+	errno_t rc;
+
+	checkbox = calloc(1, sizeof(ui_checkbox_t));
+	if (checkbox == NULL)
+		return ENOMEM;
+
+	rc = ui_control_new(&ui_checkbox_ops, (void *) checkbox,
+	    &checkbox->control);
+	if (rc != EOK) {
+		free(checkbox);
+		return rc;
+	}
+
+	checkbox->caption = str_dup(caption);
+	if (checkbox->caption == NULL) {
+		ui_control_delete(checkbox->control);
+		free(checkbox);
+		return ENOMEM;
+	}
+
+	checkbox->res = resource;
+	*rcheckbox = checkbox;
+	return EOK;
+}
+
+/** Destroy check box.
+ *
+ * @param checkbox Check box or @c NULL
+ */
+void ui_checkbox_destroy(ui_checkbox_t *checkbox)
+{
+	if (checkbox == NULL)
+		return;
+
+	ui_control_delete(checkbox->control);
+	free(checkbox);
+}
+
+/** Get base control from check box.
+ *
+ * @param checkbox Check box
+ * @return Control
+ */
+ui_control_t *ui_checkbox_ctl(ui_checkbox_t *checkbox)
+{
+	return checkbox->control;
+}
+
+/** Set check box callbacks.
+ *
+ * @param checkbox Check box
+ * @param cb Check box callbacks
+ * @param arg Callback argument
+ */
+void ui_checkbox_set_cb(ui_checkbox_t *checkbox, ui_checkbox_cb_t *cb, void *arg)
+{
+	checkbox->cb = cb;
+	checkbox->arg = arg;
+}
+
+/** Set button rectangle.
+ *
+ * @param checkbox Button
+ * @param rect New button rectangle
+ */
+void ui_checkbox_set_rect(ui_checkbox_t *checkbox, gfx_rect_t *rect)
+{
+	checkbox->rect = *rect;
+}
+
+/** Paint check box.
+ *
+ * @param checkbox Check box
+ * @return EOK on success or an error code
+ */
+errno_t ui_checkbox_paint(ui_checkbox_t *checkbox)
+{
+	gfx_coord2_t pos;
+	gfx_text_fmt_t fmt;
+	gfx_rect_t box_rect;
+	gfx_rect_t box_inside;
+	gfx_coord2_t box_center;
+	bool depressed;
+	errno_t rc;
+
+	box_rect.p0 = checkbox->rect.p0;
+	box_rect.p1.x = box_rect.p0.x + checkbox_box_w;
+	box_rect.p1.y = box_rect.p0.y + checkbox_box_h;
+
+	/* Paint checkbox frame */
+
+	rc = ui_paint_inset_frame(checkbox->res, &box_rect, &box_inside);
+	if (rc != EOK)
+		goto error;
+
+	/* Paint checkbox interior */
+
+	depressed = checkbox->held && checkbox->inside;
+
+	rc = gfx_set_color(checkbox->res->gc, depressed ?
+	    checkbox->res->entry_act_bg_color :
+	    checkbox->res->entry_bg_color);
+	if (rc != EOK)
+		goto error;
+
+	rc = gfx_fill_rect(checkbox->res->gc, &box_inside);
+	if (rc != EOK)
+		goto error;
+
+	/* Paint cross mark */
+
+	if (checkbox->checked) {
+		box_center.x = (box_inside.p0.x + box_inside.p1.x) / 2;
+		box_center.y = (box_inside.p0.y + box_inside.p1.y) / 2;
+
+		gfx_text_fmt_init(&fmt);
+		fmt.halign = gfx_halign_center;
+		fmt.valign = gfx_valign_center;
+
+		rc = gfx_set_color(checkbox->res->gc,
+		    checkbox->res->entry_fg_color);
+		if (rc != EOK)
+			goto error;
+
+		rc = gfx_puttext(checkbox->res->font, &box_center, &fmt, "X");
+		if (rc != EOK)
+			goto error;
+	}
+
+	/* Paint checkbox label */
+
+	rc = gfx_set_color(checkbox->res->gc, checkbox->res->wnd_text_color);
+	if (rc != EOK)
+		goto error;
+
+	/* Label position */
+	pos.x = box_rect.p1.x + checkbox_label_margin;
+	pos.y = (box_rect.p0.y + box_rect.p1.y) / 2;
+
+	gfx_text_fmt_init(&fmt);
+	fmt.halign = gfx_halign_left;
+	fmt.valign = gfx_valign_center;
+
+	rc = gfx_puttext(checkbox->res->font, &pos, &fmt, checkbox->caption);
+	if (rc != EOK)
+		goto error;
+
+	return EOK;
+error:
+	return rc;
+}
+
+/** Press down button.
+ *
+ * @param checkbox Check box
+ */
+void ui_checkbox_press(ui_checkbox_t *checkbox)
+{
+	if (checkbox->held)
+		return;
+
+	checkbox->inside = true;
+	checkbox->held = true;
+	(void) ui_checkbox_paint(checkbox);
+}
+
+/** Release button.
+ *
+ * @param checkbox Check box
+ */
+void ui_checkbox_release(ui_checkbox_t *checkbox)
+{
+	if (!checkbox->held)
+		return;
+
+	checkbox->held = false;
+
+	if (checkbox->inside) {
+		/* Toggle check box state */
+		checkbox->checked = !checkbox->checked;
+
+		/* Repaint and notify */
+		(void) ui_checkbox_paint(checkbox);
+		ui_checkbox_switched(checkbox);
+	}
+}
+
+/** Pointer entered button.
+ *
+ * @param checkbox Check box
+ */
+void ui_checkbox_enter(ui_checkbox_t *checkbox)
+{
+	if (checkbox->inside)
+		return;
+
+	checkbox->inside = true;
+	if (checkbox->held)
+		(void) ui_checkbox_paint(checkbox);
+}
+
+/** Pointer left button.
+ *
+ * @param checkbox Check box
+ */
+void ui_checkbox_leave(ui_checkbox_t *checkbox)
+{
+	if (!checkbox->inside)
+		return;
+
+	checkbox->inside = false;
+	if (checkbox->held)
+		(void) ui_checkbox_paint(checkbox);
+}
+
+/** Button was switched.
+ *
+ * @param checkbox Check box
+ */
+void ui_checkbox_switched(ui_checkbox_t *checkbox)
+{
+	if (checkbox->cb != NULL && checkbox->cb->switched != NULL) {
+		checkbox->cb->switched(checkbox, checkbox->arg,
+		    checkbox->checked);
+	}
+}
+
+/** Handle check box position event.
+ *
+ * @param checkbox Check box
+ * @param pos_event Position event
+ * @return @c ui_claimed iff the event is claimed
+ */
+ui_evclaim_t ui_checkbox_pos_event(ui_checkbox_t *checkbox, pos_event_t *event)
+{
+	gfx_coord2_t pos;
+	bool inside;
+
+	pos.x = event->hpos;
+	pos.y = event->vpos;
+
+	inside = gfx_pix_inside_rect(&pos, &checkbox->rect);
+
+	switch (event->type) {
+	case POS_PRESS:
+		if (inside) {
+			ui_checkbox_press(checkbox);
+			return ui_claimed;
+		}
+		break;
+	case POS_RELEASE:
+		if (checkbox->held) {
+			ui_checkbox_release(checkbox);
+			return ui_claimed;
+		}
+		break;
+	case POS_UPDATE:
+		if (inside && !checkbox->inside) {
+			ui_checkbox_enter(checkbox);
+			return ui_claimed;
+		} else if (!inside && checkbox->inside) {
+			ui_checkbox_leave(checkbox);
+		}
+		break;
+	}
+
+	return ui_unclaimed;
+}
+
+/** Destroy check box control.
+ *
+ * @param arg Argument (ui_checkbox_t *)
+ */
+void ui_checkbox_ctl_destroy(void *arg)
+{
+	ui_checkbox_t *checkbox = (ui_checkbox_t *) arg;
+
+	ui_checkbox_destroy(checkbox);
+}
+
+/** Paint check box control.
+ *
+ * @param arg Argument (ui_checkbox_t *)
+ * @return EOK on success or an error code
+ */
+errno_t ui_checkbox_ctl_paint(void *arg)
+{
+	ui_checkbox_t *checkbox = (ui_checkbox_t *) arg;
+
+	return ui_checkbox_paint(checkbox);
+}
+
+/** Handle check box control position event.
+ *
+ * @param arg Argument (ui_checkbox_t *)
+ * @param pos_event Position event
+ * @return @c ui_claimed iff the event is claimed
+ */
+ui_evclaim_t ui_checkbox_ctl_pos_event(void *arg, pos_event_t *event)
+{
+	ui_checkbox_t *checkbox = (ui_checkbox_t *) arg;
+
+	return ui_checkbox_pos_event(checkbox, event);
+}
+
+/** @}
+ */
Index: uspace/lib/ui/src/entry.c
===================================================================
--- uspace/lib/ui/src/entry.c	(revision d1582b502edcb7bfeef771a2019538f265e7e27c)
+++ uspace/lib/ui/src/entry.c	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -173,5 +173,4 @@
 	gfx_text_fmt_t fmt;
 	gfx_coord2_t pos;
-	gfx_rect_t frame;
 	gfx_rect_t inside;
 	errno_t rc;
@@ -179,13 +178,5 @@
 	/* Paint inset frame */
 
-	rc = ui_paint_bevel(entry->res->gc, &entry->rect,
-	    entry->res->wnd_shadow_color, entry->res->wnd_highlight_color,
-	    1, &frame);
-	if (rc != EOK)
-		goto error;
-
-	rc = ui_paint_bevel(entry->res->gc, &frame,
-	    entry->res->wnd_frame_sh_color, entry->res->wnd_frame_hi_color,
-	    1, &inside);
+	rc = ui_paint_inset_frame(entry->res, &entry->rect, &inside);
 	if (rc != EOK)
 		goto error;
Index: uspace/lib/ui/src/paint.c
===================================================================
--- uspace/lib/ui/src/paint.c	(revision d1582b502edcb7bfeef771a2019538f265e7e27c)
+++ uspace/lib/ui/src/paint.c	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -39,4 +39,5 @@
 #include <gfx/render.h>
 #include <ui/paint.h>
+#include "../private/resource.h"
 
 /** Paint bevel.
@@ -118,4 +119,34 @@
 }
 
+/** Paint inset frame.
+ *
+ * @param resource UI resource
+ * @param rect Rectangle to paint onto
+ * @param inside Place to store inside rectangle or @c NULL
+ * @return EOK on success or an error code
+ */
+errno_t ui_paint_inset_frame(ui_resource_t *resource, gfx_rect_t *rect,
+    gfx_rect_t *inside)
+{
+	gfx_rect_t frame;
+	errno_t rc;
+
+	rc = ui_paint_bevel(resource->gc, rect,
+	    resource->wnd_shadow_color, resource->wnd_highlight_color,
+	    1, &frame);
+	if (rc != EOK)
+		goto error;
+
+	rc = ui_paint_bevel(resource->gc, &frame,
+	    resource->wnd_frame_sh_color, resource->wnd_frame_hi_color,
+	    1, inside);
+	if (rc != EOK)
+		goto error;
+
+	return EOK;
+error:
+	return rc;
+}
+
 /** @}
  */
Index: uspace/lib/ui/src/resource.c
===================================================================
--- uspace/lib/ui/src/resource.c	(revision d1582b502edcb7bfeef771a2019538f265e7e27c)
+++ uspace/lib/ui/src/resource.c	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -76,4 +76,5 @@
 	gfx_color_t *entry_fg_color = NULL;
 	gfx_color_t *entry_bg_color = NULL;
+	gfx_color_t *entry_act_bg_color = NULL;
 	errno_t rc;
 
@@ -166,4 +167,8 @@
 
 	rc = gfx_color_new_rgb_i16(0xffff, 0xffff, 0xffff, &entry_bg_color);
+	if (rc != EOK)
+		goto error;
+
+	rc = gfx_color_new_rgb_i16(0xc8c8, 0xc8c8, 0xc8c8, &entry_act_bg_color);
 	if (rc != EOK)
 		goto error;
@@ -193,4 +198,5 @@
 	resource->entry_fg_color = entry_fg_color;
 	resource->entry_bg_color = entry_bg_color;
+	resource->entry_act_bg_color = entry_act_bg_color;
 
 	*rresource = resource;
@@ -234,4 +240,6 @@
 	if (entry_bg_color != NULL)
 		gfx_color_delete(entry_bg_color);
+	if (entry_act_bg_color != NULL)
+		gfx_color_delete(entry_act_bg_color);
 
 	if (tface != NULL)
@@ -270,4 +278,5 @@
 	gfx_color_delete(resource->entry_fg_color);
 	gfx_color_delete(resource->entry_bg_color);
+	gfx_color_delete(resource->entry_act_bg_color);
 
 	gfx_font_close(resource->font);
Index: uspace/lib/ui/test/checkbox.c
===================================================================
--- uspace/lib/ui/test/checkbox.c	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
+++ uspace/lib/ui/test/checkbox.c	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -0,0 +1,567 @@
+/*
+ * Copyright (c) 2020 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <gfx/context.h>
+#include <gfx/coord.h>
+#include <mem.h>
+#include <pcut/pcut.h>
+#include <stdbool.h>
+#include <ui/control.h>
+#include <ui/checkbox.h>
+#include <ui/resource.h>
+#include "../private/checkbox.h"
+
+PCUT_INIT;
+
+PCUT_TEST_SUITE(checkbox);
+
+static errno_t testgc_set_color(void *, gfx_color_t *);
+static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+static errno_t testgc_bitmap_create(void *, gfx_bitmap_params_t *,
+    gfx_bitmap_alloc_t *, void **);
+static errno_t testgc_bitmap_destroy(void *);
+static errno_t testgc_bitmap_render(void *, gfx_rect_t *, gfx_coord2_t *);
+static errno_t testgc_bitmap_get_alloc(void *, gfx_bitmap_alloc_t *);
+
+static gfx_context_ops_t ops = {
+	.set_color = testgc_set_color,
+	.fill_rect = testgc_fill_rect,
+	.bitmap_create = testgc_bitmap_create,
+	.bitmap_destroy = testgc_bitmap_destroy,
+	.bitmap_render = testgc_bitmap_render,
+	.bitmap_get_alloc = testgc_bitmap_get_alloc
+};
+
+static void test_checkbox_switched(ui_checkbox_t *, void *, bool);
+
+static ui_checkbox_cb_t test_checkbox_cb = {
+	.switched = test_checkbox_switched
+};
+
+static ui_checkbox_cb_t dummy_checkbox_cb = {
+};
+
+typedef struct {
+	bool bm_created;
+	bool bm_destroyed;
+	gfx_bitmap_params_t bm_params;
+	void *bm_pixels;
+	gfx_rect_t bm_srect;
+	gfx_coord2_t bm_offs;
+	bool bm_rendered;
+	bool bm_got_alloc;
+} test_gc_t;
+
+typedef struct {
+	test_gc_t *tgc;
+	gfx_bitmap_alloc_t alloc;
+	bool myalloc;
+} testgc_bitmap_t;
+
+typedef struct {
+	bool switched;
+} test_cb_resp_t;
+
+/** Create and destroy check box */
+PCUT_TEST(create_destroy)
+{
+	ui_checkbox_t *checkbox = NULL;
+	errno_t rc;
+
+	rc = ui_checkbox_create(NULL, "Hello", &checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(checkbox);
+
+	ui_checkbox_destroy(checkbox);
+}
+
+/** ui_checkbox_destroy() can take NULL argument (no-op) */
+PCUT_TEST(destroy_null)
+{
+	ui_checkbox_destroy(NULL);
+}
+
+/** ui_checkbox_ctl() returns control that has a working virtual destructor */
+PCUT_TEST(ctl)
+{
+	ui_checkbox_t *checkbox;
+	ui_control_t *control;
+	errno_t rc;
+
+	rc = ui_checkbox_create(NULL, "Hello", &checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	control = ui_checkbox_ctl(checkbox);
+	PCUT_ASSERT_NOT_NULL(control);
+
+	ui_control_destroy(control);
+}
+
+/** Set check box rectangle sets internal field */
+PCUT_TEST(set_rect)
+{
+	ui_checkbox_t *checkbox;
+	gfx_rect_t rect;
+	errno_t rc;
+
+	rc = ui_checkbox_create(NULL, "Hello", &checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rect.p0.x = 1;
+	rect.p0.y = 2;
+	rect.p1.x = 3;
+	rect.p1.y = 4;
+
+	ui_checkbox_set_rect(checkbox, &rect);
+	PCUT_ASSERT_INT_EQUALS(rect.p0.x, checkbox->rect.p0.x);
+	PCUT_ASSERT_INT_EQUALS(rect.p0.y, checkbox->rect.p0.y);
+	PCUT_ASSERT_INT_EQUALS(rect.p1.x, checkbox->rect.p1.x);
+	PCUT_ASSERT_INT_EQUALS(rect.p1.y, checkbox->rect.p1.y);
+
+	ui_checkbox_destroy(checkbox);
+}
+
+/** Paint check box */
+PCUT_TEST(paint)
+{
+	errno_t rc;
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
+	ui_checkbox_t *checkbox;
+
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_checkbox_create(resource, "Hello", &checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_checkbox_paint(checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	ui_checkbox_destroy(checkbox);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test ui_checkbox_switched() */
+PCUT_TEST(switched)
+{
+	errno_t rc;
+	ui_checkbox_t *checkbox;
+	test_cb_resp_t resp;
+
+	rc = ui_checkbox_create(NULL, "Hello", &checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	/* Switched with no callbacks set */
+	ui_checkbox_switched(checkbox);
+
+	/* Switched with callback not implementing switched */
+	ui_checkbox_set_cb(checkbox, &dummy_checkbox_cb, NULL);
+	ui_checkbox_switched(checkbox);
+
+	/* Switched with real callback set */
+	resp.switched = false;
+	ui_checkbox_set_cb(checkbox, &test_checkbox_cb, &resp);
+	ui_checkbox_switched(checkbox);
+	PCUT_ASSERT_TRUE(resp.switched);
+
+	ui_checkbox_destroy(checkbox);
+}
+
+/** Press and release check box */
+PCUT_TEST(press_release)
+{
+	errno_t rc;
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
+	ui_checkbox_t *checkbox;
+	test_cb_resp_t resp;
+
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_checkbox_create(resource, "Hello", &checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_FALSE(checkbox->checked);
+
+	resp.switched = false;
+	ui_checkbox_set_cb(checkbox, &test_checkbox_cb, &resp);
+
+	PCUT_ASSERT_FALSE(checkbox->held);
+	PCUT_ASSERT_FALSE(checkbox->inside);
+
+	ui_checkbox_press(checkbox);
+	PCUT_ASSERT_TRUE(checkbox->held);
+	PCUT_ASSERT_TRUE(checkbox->inside);
+	PCUT_ASSERT_FALSE(resp.switched);
+	PCUT_ASSERT_FALSE(checkbox->checked);
+
+	ui_checkbox_release(checkbox);
+	PCUT_ASSERT_FALSE(checkbox->held);
+	PCUT_ASSERT_TRUE(checkbox->inside);
+	PCUT_ASSERT_TRUE(resp.switched);
+	PCUT_ASSERT_TRUE(checkbox->checked);
+
+	ui_checkbox_destroy(checkbox);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Press, leave and release check box */
+PCUT_TEST(press_leave_release)
+{
+	errno_t rc;
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
+	ui_checkbox_t *checkbox;
+	test_cb_resp_t resp;
+
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_checkbox_create(resource, "Hello", &checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	resp.switched = false;
+	ui_checkbox_set_cb(checkbox, &test_checkbox_cb, &resp);
+
+	PCUT_ASSERT_FALSE(checkbox->held);
+	PCUT_ASSERT_FALSE(checkbox->inside);
+
+	ui_checkbox_press(checkbox);
+	PCUT_ASSERT_TRUE(checkbox->held);
+	PCUT_ASSERT_TRUE(checkbox->inside);
+	PCUT_ASSERT_FALSE(resp.switched);
+	PCUT_ASSERT_FALSE(checkbox->checked);
+
+	ui_checkbox_leave(checkbox);
+	PCUT_ASSERT_TRUE(checkbox->held);
+	PCUT_ASSERT_FALSE(checkbox->inside);
+	PCUT_ASSERT_FALSE(resp.switched);
+	PCUT_ASSERT_FALSE(checkbox->checked);
+
+	ui_checkbox_release(checkbox);
+	PCUT_ASSERT_FALSE(checkbox->held);
+	PCUT_ASSERT_FALSE(checkbox->inside);
+	PCUT_ASSERT_FALSE(resp.switched);
+	PCUT_ASSERT_FALSE(checkbox->checked);
+
+	ui_checkbox_destroy(checkbox);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Press, leave, enter and release check box */
+PCUT_TEST(press_leave_enter_release)
+{
+	errno_t rc;
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
+	ui_checkbox_t *checkbox;
+	test_cb_resp_t resp;
+
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_checkbox_create(resource, "Hello", &checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_FALSE(checkbox->checked);
+
+	resp.switched = false;
+	ui_checkbox_set_cb(checkbox, &test_checkbox_cb, &resp);
+
+	PCUT_ASSERT_FALSE(checkbox->held);
+	PCUT_ASSERT_FALSE(checkbox->inside);
+
+	ui_checkbox_press(checkbox);
+	PCUT_ASSERT_TRUE(checkbox->held);
+	PCUT_ASSERT_TRUE(checkbox->inside);
+	PCUT_ASSERT_FALSE(resp.switched);
+	PCUT_ASSERT_FALSE(checkbox->checked);
+
+	ui_checkbox_leave(checkbox);
+	PCUT_ASSERT_TRUE(checkbox->held);
+	PCUT_ASSERT_FALSE(checkbox->inside);
+	PCUT_ASSERT_FALSE(resp.switched);
+	PCUT_ASSERT_FALSE(checkbox->checked);
+
+	ui_checkbox_enter(checkbox);
+	PCUT_ASSERT_TRUE(checkbox->held);
+	PCUT_ASSERT_TRUE(checkbox->inside);
+	PCUT_ASSERT_FALSE(resp.switched);
+	PCUT_ASSERT_FALSE(checkbox->checked);
+
+	ui_checkbox_release(checkbox);
+	PCUT_ASSERT_FALSE(checkbox->held);
+	PCUT_ASSERT_TRUE(checkbox->inside);
+	PCUT_ASSERT_TRUE(resp.switched);
+	PCUT_ASSERT_TRUE(checkbox->checked);
+
+	ui_checkbox_destroy(checkbox);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** ui_pos_event() correctly translates POS_PRESS/POS_RELEASE */
+PCUT_TEST(pos_event_press_release)
+{
+	errno_t rc;
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
+	ui_checkbox_t *checkbox;
+	ui_evclaim_t claim;
+	pos_event_t event;
+	gfx_rect_t rect;
+
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_checkbox_create(resource, "Hello", &checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	PCUT_ASSERT_FALSE(checkbox->held);
+
+	rect.p0.x = 10;
+	rect.p0.y = 20;
+	rect.p1.x = 30;
+	rect.p1.y = 40;
+	ui_checkbox_set_rect(checkbox, &rect);
+
+	/* Press outside is not claimed and does nothing */
+	event.type = POS_PRESS;
+	event.hpos = 9;
+	event.vpos = 20;
+	claim = ui_checkbox_pos_event(checkbox, &event);
+	PCUT_ASSERT_FALSE(checkbox->held);
+	PCUT_ASSERT_EQUALS(ui_unclaimed, claim);
+
+	/* Press inside is claimed and depresses check box */
+	event.type = POS_PRESS;
+	event.hpos = 10;
+	event.vpos = 20;
+	claim = ui_checkbox_pos_event(checkbox, &event);
+	PCUT_ASSERT_TRUE(checkbox->held);
+	PCUT_ASSERT_EQUALS(ui_claimed, claim);
+
+	/* Release outside (or anywhere) is claimed and relases check box */
+	event.type = POS_RELEASE;
+	event.hpos = 9;
+	event.vpos = 20;
+	claim = ui_checkbox_pos_event(checkbox, &event);
+	PCUT_ASSERT_FALSE(checkbox->held);
+	PCUT_ASSERT_EQUALS(ui_claimed, claim);
+
+	ui_checkbox_destroy(checkbox);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** ui_pos_event() correctly translates POS_UPDATE to enter/leave */
+PCUT_TEST(pos_event_enter_leave)
+{
+	errno_t rc;
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
+	ui_checkbox_t *checkbox;
+	pos_event_t event;
+	gfx_rect_t rect;
+
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_checkbox_create(resource, "Hello", &checkbox);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	PCUT_ASSERT_FALSE(checkbox->inside);
+
+	rect.p0.x = 10;
+	rect.p0.y = 20;
+	rect.p1.x = 30;
+	rect.p1.y = 40;
+	ui_checkbox_set_rect(checkbox, &rect);
+
+	/* Moving outside does nothing */
+	event.type = POS_UPDATE;
+	event.hpos = 9;
+	event.vpos = 20;
+	ui_checkbox_pos_event(checkbox, &event);
+	PCUT_ASSERT_FALSE(checkbox->inside);
+
+	/* Moving inside sets inside flag */
+	event.type = POS_UPDATE;
+	event.hpos = 10;
+	event.vpos = 20;
+	ui_checkbox_pos_event(checkbox, &event);
+	PCUT_ASSERT_TRUE(checkbox->inside);
+
+	/* Moving outside clears inside flag */
+	event.type = POS_UPDATE;
+	event.hpos = 9;
+	event.vpos = 20;
+	ui_checkbox_pos_event(checkbox, &event);
+	PCUT_ASSERT_FALSE(checkbox->inside);
+
+	ui_checkbox_destroy(checkbox);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+static errno_t testgc_set_color(void *arg, gfx_color_t *color)
+{
+	(void) arg;
+	(void) color;
+	return EOK;
+}
+
+static errno_t testgc_fill_rect(void *arg, gfx_rect_t *rect)
+{
+	(void) arg;
+	(void) rect;
+	return EOK;
+}
+
+static errno_t testgc_bitmap_create(void *arg, gfx_bitmap_params_t *params,
+    gfx_bitmap_alloc_t *alloc, void **rbm)
+{
+	test_gc_t *tgc = (test_gc_t *) arg;
+	testgc_bitmap_t *tbm;
+
+	tbm = calloc(1, sizeof(testgc_bitmap_t));
+	if (tbm == NULL)
+		return ENOMEM;
+
+	if (alloc == NULL) {
+		tbm->alloc.pitch = (params->rect.p1.x - params->rect.p0.x) *
+		    sizeof(uint32_t);
+		tbm->alloc.off0 = 0;
+		tbm->alloc.pixels = calloc(sizeof(uint32_t),
+		    (params->rect.p1.x - params->rect.p0.x) *
+		    (params->rect.p1.y - params->rect.p0.y));
+		tbm->myalloc = true;
+		if (tbm->alloc.pixels == NULL) {
+			free(tbm);
+			return ENOMEM;
+		}
+	} else {
+		tbm->alloc = *alloc;
+	}
+
+	tbm->tgc = tgc;
+	tgc->bm_created = true;
+	tgc->bm_params = *params;
+	tgc->bm_pixels = tbm->alloc.pixels;
+	*rbm = (void *)tbm;
+	return EOK;
+}
+
+static errno_t testgc_bitmap_destroy(void *bm)
+{
+	testgc_bitmap_t *tbm = (testgc_bitmap_t *)bm;
+	if (tbm->myalloc)
+		free(tbm->alloc.pixels);
+	tbm->tgc->bm_destroyed = true;
+	free(tbm);
+	return EOK;
+}
+
+static errno_t testgc_bitmap_render(void *bm, gfx_rect_t *srect,
+    gfx_coord2_t *offs)
+{
+	testgc_bitmap_t *tbm = (testgc_bitmap_t *)bm;
+	tbm->tgc->bm_rendered = true;
+	tbm->tgc->bm_srect = *srect;
+	tbm->tgc->bm_offs = *offs;
+	return EOK;
+}
+
+static errno_t testgc_bitmap_get_alloc(void *bm, gfx_bitmap_alloc_t *alloc)
+{
+	testgc_bitmap_t *tbm = (testgc_bitmap_t *)bm;
+	*alloc = tbm->alloc;
+	tbm->tgc->bm_got_alloc = true;
+	return EOK;
+}
+
+static void test_checkbox_switched(ui_checkbox_t *checkbox, void *arg,
+    bool checked)
+{
+	test_cb_resp_t *resp = (test_cb_resp_t *) arg;
+
+	resp->switched = true;
+}
+
+PCUT_EXPORT(checkbox);
Index: uspace/lib/ui/test/main.c
===================================================================
--- uspace/lib/ui/test/main.c	(revision d1582b502edcb7bfeef771a2019538f265e7e27c)
+++ uspace/lib/ui/test/main.c	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -32,4 +32,5 @@
 
 PCUT_IMPORT(control);
+PCUT_IMPORT(checkbox);
 PCUT_IMPORT(entry);
 PCUT_IMPORT(fixed);
Index: uspace/lib/ui/test/paint.c
===================================================================
--- uspace/lib/ui/test/paint.c	(revision d1582b502edcb7bfeef771a2019538f265e7e27c)
+++ uspace/lib/ui/test/paint.c	(revision d70dc1c40835f7e957ea1b4fa52c29db4d21ced4)
@@ -33,4 +33,5 @@
 #include <stdbool.h>
 #include <ui/paint.h>
+#include <ui/resource.h>
 
 PCUT_INIT;
@@ -103,4 +104,34 @@
 	gfx_color_delete(color2);
 	gfx_color_delete(color1);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Paint inset frame */
+PCUT_TEST(inset_frame)
+{
+	errno_t rc;
+	gfx_context_t *gc = NULL;
+	ui_resource_t *resource = NULL;
+	test_gc_t tgc;
+	gfx_rect_t rect;
+	gfx_rect_t inside;
+
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	/* Paint inset frame with NULL 'inside' output parameter */
+	rc = ui_paint_inset_frame(resource, &rect, NULL);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	/* Paint inset frame with valid 'inside' output parameter */
+	rc = ui_paint_inset_frame(resource, &rect, &inside);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
 	rc = gfx_context_delete(gc);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
