Changeset 86fff971 in mainline for uspace/lib/ui/src/checkbox.c
- Timestamp:
- 2022-04-04T18:49:30Z (2 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fd05ea6
- Parents:
- d68239a1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/checkbox.c
rd68239a1 r86fff971 1 1 /* 2 * Copyright (c) 202 1Jiri Svoboda2 * Copyright (c) 2022 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 52 52 checkbox_box_h = 16, 53 53 checkbox_label_margin = 8, 54 checkbox_cross_n = 5, 55 checkbox_cross_w = 2, 56 checkbox_cross_h = 2 54 57 }; 55 58 … … 188 191 189 192 if (checkbox->checked) { 190 box_center.x = (box_inside.p0.x + box_inside.p1.x) / 2;191 box_center.y = (box_inside.p0.y + box_inside.p1.y) / 2;192 193 gfx_text_fmt_init(&fmt);194 fmt.font = checkbox->res->font; 195 fmt.color = checkbox->res->entry_fg_color;196 fmt.halign = gfx_halign_center;197 fmt.valign = gfx_valign_center; 198 199 rc = gfx_puttext(&box_center, &fmt, "X");193 rc = gfx_set_color(checkbox->res->gc, 194 checkbox->res->entry_fg_color); 195 if (rc != EOK) 196 goto error; 197 198 box_center.x = (box_inside.p0.x + box_inside.p1.x) / 2 - 1; 199 box_center.y = (box_inside.p0.y + box_inside.p1.y) / 2 - 1; 200 201 rc = ui_paint_cross(checkbox->res->gc, &box_center, 202 checkbox_cross_n, checkbox_cross_w, checkbox_cross_h); 200 203 if (rc != EOK) 201 204 goto error;
Note:
See TracChangeset
for help on using the changeset viewer.