Changeset b433f68 in mainline for uspace/lib/ui/src
- Timestamp:
- 2021-02-26T16:23:36Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 77ffa01
- Parents:
- fe40b67
- Location:
- uspace/lib/ui/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/checkbox.c
rfe40b67 rb433f68 192 192 193 193 gfx_text_fmt_init(&fmt); 194 fmt.color = checkbox->res->entry_fg_color; 194 195 fmt.halign = gfx_halign_center; 195 196 fmt.valign = gfx_valign_center; 196 197 rc = gfx_set_color(checkbox->res->gc,198 checkbox->res->entry_fg_color);199 if (rc != EOK)200 goto error;201 197 202 198 rc = gfx_puttext(checkbox->res->font, &box_center, &fmt, "X"); … … 207 203 /* Paint checkbox label */ 208 204 209 rc = gfx_set_color(checkbox->res->gc, checkbox->res->wnd_text_color);210 if (rc != EOK)211 goto error;212 213 /* Label position */214 205 pos.x = box_rect.p1.x + checkbox_label_margin; 215 206 pos.y = (box_rect.p0.y + box_rect.p1.y) / 2; 216 207 217 208 gfx_text_fmt_init(&fmt); 209 fmt.color = checkbox->res->wnd_text_color; 218 210 fmt.halign = gfx_halign_left; 219 211 fmt.valign = gfx_valign_center; -
uspace/lib/ui/src/entry.c
rfe40b67 rb433f68 208 208 209 209 gfx_text_fmt_init(&fmt); 210 fmt.color = entry->res->entry_fg_color; 210 211 fmt.halign = entry->halign; 211 212 fmt.valign = gfx_valign_top; 212 213 rc = gfx_set_color(entry->res->gc, entry->res->entry_fg_color);214 if (rc != EOK)215 goto error;216 213 217 214 rc = gfx_puttext(entry->res->font, &pos, &fmt, entry->text); -
uspace/lib/ui/src/label.c
rfe40b67 rb433f68 193 193 194 194 gfx_text_fmt_init(&fmt); 195 fmt.color = label->res->wnd_text_color; 195 196 fmt.halign = label->halign; 196 197 fmt.valign = gfx_valign_top; 197 198 rc = gfx_set_color(label->res->gc, label->res->wnd_text_color);199 if (rc != EOK)200 goto error;201 198 202 199 rc = gfx_puttext(label->res->font, &pos, &fmt, label->text); -
uspace/lib/ui/src/pbutton.c
rfe40b67 rb433f68 269 269 goto error; 270 270 271 rc = gfx_set_color(pbutton->res->gc, pbutton->res->btn_text_color);272 if (rc != EOK)273 goto error;274 275 271 /* Center of button rectangle */ 276 272 pos.x = (rect.p0.x + rect.p1.x) / 2; … … 283 279 284 280 gfx_text_fmt_init(&fmt); 281 fmt.color = pbutton->res->btn_text_color; 285 282 fmt.halign = gfx_halign_center; 286 283 fmt.valign = gfx_valign_center; -
uspace/lib/ui/src/rbutton.c
rfe40b67 rb433f68 274 274 /* Paint rbutton label */ 275 275 276 rc = gfx_set_color(rbutton->group->res->gc,277 rbutton->group->res->wnd_text_color);278 if (rc != EOK)279 goto error;280 281 /* Label position */282 276 pos.x = center.x + rbutton_oframe_r + rbutton_label_margin; 283 277 pos.y = center.y; 284 278 285 279 gfx_text_fmt_init(&fmt); 280 fmt.color = rbutton->group->res->wnd_text_color; 286 281 fmt.halign = gfx_halign_left; 287 282 fmt.valign = gfx_valign_center; -
uspace/lib/ui/src/wdecor.c
rfe40b67 rb433f68 213 213 214 214 gfx_text_fmt_init(&fmt); 215 fmt.color = wdecor->active ? 216 wdecor->res->tbar_act_text_color : 217 wdecor->res->tbar_inact_text_color; 215 218 fmt.halign = gfx_halign_center; 216 219 fmt.valign = gfx_valign_center; … … 218 221 pos.x = (trect.p0.x + trect.p1.x) / 2; 219 222 pos.y = (trect.p0.y + trect.p1.y) / 2; 220 221 rc = gfx_set_color(wdecor->res->gc, wdecor->active ?222 wdecor->res->tbar_act_text_color :223 wdecor->res->tbar_inact_text_color);224 if (rc != EOK)225 return rc;226 223 227 224 rc = gfx_puttext(wdecor->res->font, &pos, &fmt, wdecor->caption);
Note:
See TracChangeset
for help on using the changeset viewer.