Index: uspace/app/uidemo/uidemo.c
===================================================================
--- uspace/app/uidemo/uidemo.c	(revision 17696938536729f8e143b51c1b0e5b84bbb276e7)
+++ uspace/app/uidemo/uidemo.c	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -40,4 +40,5 @@
 #include <str.h>
 #include <task.h>
+#include <ui/label.h>
 #include <ui/pbutton.h>
 #include <ui/resource.h>
@@ -138,9 +139,18 @@
 {
 	ui_demo_t *demo = (ui_demo_t *) arg;
+	errno_t rc;
 
 	if (pbutton == demo->pb1) {
 		printf("Clicked 'Confirm' button\n");
+		rc = ui_label_set_text(demo->label, "Confirmed");
+		if (rc != EOK)
+			printf("Error changing label text.\n");
+		(void) ui_label_paint(demo->label);
 	} else {
 		printf("Clicked 'Cancel' button\n");
+		rc = ui_label_set_text(demo->label, "Cancelled");
+		if (rc != EOK)
+			printf("Error changing label text.\n");
+		(void) ui_label_paint(demo->label);
 	}
 }
@@ -221,4 +231,16 @@
 	ui_wdecor_set_cb(demo.wdecor, &wdecor_cb, (void *) &demo);
 
+	rc = ui_label_create(ui_res, "Hello there!", &demo.label);
+	if (rc != EOK) {
+		printf("Error creating label.\n");
+		return rc;
+	}
+
+	rect.p0.x = 60;
+	rect.p0.y = 37;
+	rect.p1.x = 160;
+	rect.p1.y = 50;
+	ui_label_set_rect(demo.label, &rect);
+
 	rc = ui_pbutton_create(ui_res, "Confirm", &demo.pb1);
 	if (rc != EOK) {
@@ -229,8 +251,8 @@
 	ui_pbutton_set_cb(demo.pb1, &pbutton_cb, (void *) &demo);
 
-	rect.p0.x = 20;
-	rect.p0.y = 50;
-	rect.p1.x = 100;
-	rect.p1.y = 80;
+	rect.p0.x = 15;
+	rect.p0.y = 60;
+	rect.p1.x = 105;
+	rect.p1.y = 88;
 	ui_pbutton_set_rect(demo.pb1, &rect);
 
@@ -245,8 +267,8 @@
 	ui_pbutton_set_cb(demo.pb2, &pbutton_cb, (void *) &demo);
 
-	rect.p0.x = 120;
-	rect.p0.y = 50;
-	rect.p1.x = 200;
-	rect.p1.y = 80;
+	rect.p0.x = 115;
+	rect.p0.y = 60;
+	rect.p1.x = 205;
+	rect.p1.y = 88;
 	ui_pbutton_set_rect(demo.pb2, &rect);
 
@@ -275,4 +297,10 @@
 	if (rc != EOK) {
 		printf("Error painting window decoration.\n");
+		return rc;
+	}
+
+	rc = ui_label_paint(demo.label);
+	if (rc != EOK) {
+		printf("Error painting button.\n");
 		return rc;
 	}
Index: uspace/app/uidemo/uidemo.h
===================================================================
--- uspace/app/uidemo/uidemo.h	(revision 17696938536729f8e143b51c1b0e5b84bbb276e7)
+++ uspace/app/uidemo/uidemo.h	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -38,4 +38,5 @@
 
 #include <display.h>
+#include <ui/label.h>
 #include <ui/pbutton.h>
 #include <ui/wdecor.h>
@@ -45,4 +46,5 @@
 	display_window_t *dwindow;
 	ui_wdecor_t *wdecor;
+	ui_label_t *label;
 	ui_pbutton_t *pb1;
 	ui_pbutton_t *pb2;
Index: uspace/lib/ui/include/types/ui/label.h
===================================================================
--- uspace/lib/ui/include/types/ui/label.h	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
+++ uspace/lib/ui/include/types/ui/label.h	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -0,0 +1,45 @@
+/*
+ * 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 Label
+ */
+
+#ifndef _UI_TYPES_LABEL_H
+#define _UI_TYPES_LABEL_H
+
+struct ui_label;
+typedef struct ui_label ui_label_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/include/ui/label.h
===================================================================
--- uspace/lib/ui/include/ui/label.h	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
+++ uspace/lib/ui/include/ui/label.h	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -0,0 +1,54 @@
+/*
+ * 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 Label
+ */
+
+#ifndef _UI_LABEL_H
+#define _UI_LABEL_H
+
+#include <errno.h>
+#include <gfx/coord.h>
+#include <types/ui/label.h>
+#include <types/ui/resource.h>
+
+extern errno_t ui_label_create(ui_resource_t *, const char *,
+    ui_label_t **);
+extern void ui_label_destroy(ui_label_t *);
+extern void ui_label_set_rect(ui_label_t *, gfx_rect_t *);
+extern errno_t ui_label_set_text(ui_label_t *, const char *);
+extern errno_t ui_label_paint(ui_label_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/meson.build
===================================================================
--- uspace/lib/ui/meson.build	(revision 17696938536729f8e143b51c1b0e5b84bbb276e7)
+++ uspace/lib/ui/meson.build	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -29,4 +29,5 @@
 deps = [ 'gfx', 'gfxfont' ]
 src = files(
+	'src/label.c',
 	'src/paint.c',
 	'src/pbutton.c',
@@ -36,4 +37,5 @@
 
 test_src = files(
+	'test/label.c',
 	'test/main.c',
 	'test/paint.c',
Index: uspace/lib/ui/private/label.h
===================================================================
--- uspace/lib/ui/private/label.h	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
+++ uspace/lib/ui/private/label.h	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -0,0 +1,58 @@
+/*
+ * 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 Label structure
+ *
+ */
+
+#ifndef _UI_PRIVATE_LABEL_H
+#define _UI_PRIVATE_LABEL_H
+
+#include <gfx/coord.h>
+
+/** Actual structure of label.
+ *
+ * This is private to libui.
+ */
+struct ui_label {
+	/** UI resource */
+	struct ui_resource *res;
+	/** Label rectangle */
+	gfx_rect_t rect;
+	/** Text */
+	char *text;
+};
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/src/label.c
===================================================================
--- uspace/lib/ui/src/label.c	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
+++ uspace/lib/ui/src/label.c	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -0,0 +1,157 @@
+/*
+ * 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 Label
+ */
+
+#include <errno.h>
+#include <gfx/context.h>
+#include <gfx/render.h>
+#include <gfx/text.h>
+#include <stdlib.h>
+#include <str.h>
+#include <ui/paint.h>
+#include <ui/label.h>
+#include "../private/label.h"
+#include "../private/resource.h"
+
+/** Create new label.
+ *
+ * @param resource UI resource
+ * @param text Text
+ * @param rlabel Place to store pointer to new label
+ * @return EOK on success, ENOMEM if out of memory
+ */
+errno_t ui_label_create(ui_resource_t *resource, const char *text,
+    ui_label_t **rlabel)
+{
+	ui_label_t *label;
+
+	label = calloc(1, sizeof(ui_label_t));
+	if (label == NULL)
+		return ENOMEM;
+
+	label->text = str_dup(text);
+	if (label->text == NULL) {
+		free(label);
+		return ENOMEM;
+	}
+
+	label->res = resource;
+	*rlabel = label;
+	return EOK;
+}
+
+/** Destroy label.
+ *
+ * @param label Label or @c NULL
+ */
+void ui_label_destroy(ui_label_t *label)
+{
+	if (label == NULL)
+		return;
+
+	free(label);
+}
+
+/** Set label rectangle.
+ *
+ * @param label Label
+ * @param rect New label rectangle
+ */
+void ui_label_set_rect(ui_label_t *label, gfx_rect_t *rect)
+{
+	label->rect = *rect;
+}
+
+/** Set label text.
+ *
+ * @param label Label
+ * @param text New label text
+ * @return EOK on success, ENOMEM if out of memory
+ */
+errno_t ui_label_set_text(ui_label_t *label, const char *text)
+{
+	char *tcopy;
+
+	tcopy = str_dup(text);
+	if (tcopy == NULL)
+		return ENOMEM;
+
+	free(label->text);
+	label->text = tcopy;
+
+	return EOK;
+}
+
+/** Paint label.
+ *
+ * @param label Label
+ * @return EOK on success or an error code
+ */
+errno_t ui_label_paint(ui_label_t *label)
+{
+	gfx_text_fmt_t fmt;
+	gfx_coord2_t pos;
+	errno_t rc;
+
+	/* Paint label background */
+
+	rc = gfx_set_color(label->res->gc, label->res->wnd_face_color);
+	if (rc != EOK)
+		goto error;
+
+	rc = gfx_fill_rect(label->res->gc, &label->rect);
+	if (rc != EOK)
+		goto error;
+
+	pos = label->rect.p0;
+
+	gfx_text_fmt_init(&fmt);
+	fmt.halign = gfx_halign_left;
+	fmt.valign = gfx_valign_top;
+
+	rc = gfx_set_color(label->res->gc, label->res->wnd_text_color);
+	if (rc != EOK)
+		goto error;
+
+	rc = gfx_puttext(label->res->font, &pos, &fmt, label->text);
+	if (rc != EOK)
+		goto error;
+
+	return EOK;
+error:
+	return rc;
+}
+
+/** @}
+ */
Index: uspace/lib/ui/src/pbutton.c
===================================================================
--- uspace/lib/ui/src/pbutton.c	(revision 17696938536729f8e143b51c1b0e5b84bbb276e7)
+++ uspace/lib/ui/src/pbutton.c	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -107,5 +107,5 @@
  *
  * @param pbutton Button
- * @param rect New button rectanle
+ * @param rect New button rectangle
  */
 void ui_pbutton_set_rect(ui_pbutton_t *pbutton, gfx_rect_t *rect)
Index: uspace/lib/ui/src/resource.c
===================================================================
--- uspace/lib/ui/src/resource.c	(revision 17696938536729f8e143b51c1b0e5b84bbb276e7)
+++ uspace/lib/ui/src/resource.c	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -50,5 +50,5 @@
  *
  * @param gc Graphic context
- * @param rresource Place to store pointer to new push button
+ * @param rresource Place to store pointer to new UI resource
  * @return EOK on success, ENOMEM if out of memory
  */
Index: uspace/lib/ui/src/wdecor.c
===================================================================
--- uspace/lib/ui/src/wdecor.c	(revision 17696938536729f8e143b51c1b0e5b84bbb276e7)
+++ uspace/lib/ui/src/wdecor.c	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -102,5 +102,5 @@
  *
  * @param wdecor Window decoration
- * @param rect New button rectanle
+ * @param rect New window decoration rectangle
  */
 void ui_wdecor_set_rect(ui_wdecor_t *wdecor, gfx_rect_t *rect)
Index: uspace/lib/ui/test/label.c
===================================================================
--- uspace/lib/ui/test/label.c	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
+++ uspace/lib/ui/test/label.c	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -0,0 +1,253 @@
+/*
+ * 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/label.h>
+#include <ui/resource.h>
+#include "../private/label.h"
+
+PCUT_INIT;
+
+PCUT_TEST_SUITE(label);
+
+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
+};
+
+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 clicked;
+} test_cb_resp_t;
+
+/** Create and destroy button */
+PCUT_TEST(create_destroy)
+{
+	ui_label_t *label = NULL;
+	errno_t rc;
+
+	rc = ui_label_create(NULL, "Hello", &label);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(label);
+
+	ui_label_destroy(label);
+}
+
+/** ui_label_destroy() can take NULL argument (no-op) */
+PCUT_TEST(destroy_null)
+{
+	ui_label_destroy(NULL);
+}
+
+/** Set button rectangle sets internal field */
+PCUT_TEST(set_rect)
+{
+	ui_label_t *label;
+	gfx_rect_t rect;
+	errno_t rc;
+
+	rc = ui_label_create(NULL, "Hello", &label);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rect.p0.x = 1;
+	rect.p0.y = 2;
+	rect.p1.x = 3;
+	rect.p1.y = 4;
+
+	ui_label_set_rect(label, &rect);
+	PCUT_ASSERT_INT_EQUALS(rect.p0.x, label->rect.p0.x);
+	PCUT_ASSERT_INT_EQUALS(rect.p0.y, label->rect.p0.y);
+	PCUT_ASSERT_INT_EQUALS(rect.p1.x, label->rect.p1.x);
+	PCUT_ASSERT_INT_EQUALS(rect.p1.y, label->rect.p1.y);
+
+	ui_label_destroy(label);
+}
+
+/** Set button rectangle sets internal field */
+PCUT_TEST(set_text)
+{
+	ui_label_t *label;
+	gfx_rect_t rect;
+	errno_t rc;
+
+	rc = ui_label_create(NULL, "Hello", &label);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rect.p0.x = 1;
+	rect.p0.y = 2;
+	rect.p1.x = 3;
+	rect.p1.y = 4;
+
+	ui_label_set_rect(label, &rect);
+	PCUT_ASSERT_INT_EQUALS(rect.p0.x, label->rect.p0.x);
+	PCUT_ASSERT_INT_EQUALS(rect.p0.y, label->rect.p0.y);
+	PCUT_ASSERT_INT_EQUALS(rect.p1.x, label->rect.p1.x);
+	PCUT_ASSERT_INT_EQUALS(rect.p1.y, label->rect.p1.y);
+
+	ui_label_destroy(label);
+}
+
+/** Paint button */
+PCUT_TEST(paint)
+{
+	errno_t rc;
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
+	ui_label_t *label;
+
+	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_label_create(resource, "Hello", &label);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_label_paint(label);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	ui_label_destroy(label);
+	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;
+}
+
+PCUT_EXPORT(label);
Index: uspace/lib/ui/test/main.c
===================================================================
--- uspace/lib/ui/test/main.c	(revision 17696938536729f8e143b51c1b0e5b84bbb276e7)
+++ uspace/lib/ui/test/main.c	(revision ba09d06aebf790cc076fec896c12c86cdc473960)
@@ -31,4 +31,5 @@
 PCUT_INIT;
 
+PCUT_IMPORT(label);
 PCUT_IMPORT(paint);
 PCUT_IMPORT(pbutton);
