Changeset 4583015 in mainline for uspace/lib/ui/src/entry.c
- Timestamp:
- 2022-03-07T16:10:44Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ca2680d
- Parents:
- 5c27e77
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/entry.c
r5c27e77 r4583015 314 314 315 315 gfx_text_fmt_init(&fmt); 316 fmt.font = res->font; 316 317 fmt.color = res->entry_fg_color; 317 318 fmt.halign = gfx_halign_left; … … 329 330 entry->text[off1] = '\0'; 330 331 331 rc = gfx_puttext( res->font,&pos, &fmt, entry->text);332 rc = gfx_puttext(&pos, &fmt, entry->text); 332 333 if (rc != EOK) { 333 334 (void) gfx_set_clip_rect(res->gc, NULL); … … 335 336 } 336 337 337 gfx_text_cont( res->font,&pos, &fmt, entry->text, &cpos, &cfmt);338 gfx_text_cont(&pos, &fmt, entry->text, &cpos, &cfmt); 338 339 entry->text[off1] = c; 339 340 … … 345 346 cfmt.color = res->entry_sel_text_fg_color; 346 347 347 gfx_text_rect( res->font,&cpos, &cfmt, entry->text + off1, &sel);348 gfx_text_rect(&cpos, &cfmt, entry->text + off1, &sel); 348 349 sel.p0.x -= ui_entry_sel_hpad; 349 350 sel.p0.y -= ui_entry_sel_vpad; … … 359 360 goto error; 360 361 361 rc = gfx_puttext( res->font,&cpos, &cfmt, entry->text + off1);362 rc = gfx_puttext(&cpos, &cfmt, entry->text + off1); 362 363 if (rc != EOK) { 363 364 (void) gfx_set_clip_rect(res->gc, NULL); … … 365 366 } 366 367 367 gfx_text_cont(res->font, &cpos, &cfmt, entry->text + off1, 368 &cpos, &cfmt); 368 gfx_text_cont(&cpos, &cfmt, entry->text + off1, &cpos, &cfmt); 369 369 370 370 entry->text[off2] = c; … … 374 374 cfmt.color = res->entry_fg_color; 375 375 376 rc = gfx_puttext( res->font,&cpos, &cfmt, entry->text + off2);376 rc = gfx_puttext(&cpos, &cfmt, entry->text + off2); 377 377 if (rc != EOK) { 378 378 (void) gfx_set_clip_rect(res->gc, NULL); … … 421 421 422 422 gfx_text_fmt_init(&fmt); 423 fmt.font = res->font; 423 424 fmt.halign = gfx_halign_left; 424 425 fmt.valign = gfx_valign_top; 425 426 426 return gfx_text_find_pos(res->font, &geom.text_pos, &fmt, 427 entry->text, fpos); 427 return gfx_text_find_pos(&geom.text_pos, &fmt, entry->text, fpos); 428 428 } 429 429 … … 1111 1111 anchor.y = 0; 1112 1112 gfx_text_fmt_init(&fmt); 1113 fmt.font = res->font; 1113 1114 fmt.halign = entry->halign; 1114 gfx_text_start_pos(res->font, &anchor, &fmt, entry->text, 1115 &tpos); 1115 gfx_text_start_pos(&anchor, &fmt, entry->text, &tpos); 1116 1116 entry->scroll_pos = tpos.x - geom.text_rect.p0.x; 1117 1117 } else if (geom.text_pos.x + width < geom.text_rect.p1.x &&
Note:
See TracChangeset
for help on using the changeset viewer.