Changeset 6df564c in mainline
- Timestamp:
- 2021-09-19T18:02:14Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 68632b4
- Parents:
- 80d4aea
- Location:
- uspace/lib/ui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/private/resource.h
r80d4aea r6df564c 105 105 /** Entry (text entry, checkbox, raido button) active background color */ 106 106 gfx_color_t *entry_act_bg_color; 107 /** Entry selected text foreground color */ 108 gfx_color_t *entry_sel_text_fg_color; 109 /** Entry selected text background color */ 110 gfx_color_t *entry_sel_text_bg_color; 107 111 108 112 /** Expose callback or @c NULL */ -
uspace/lib/ui/src/entry.c
r80d4aea r6df564c 343 343 c = entry->text[off2]; 344 344 entry->text[off2] = '\0'; 345 cfmt.color = res->entry_ bg_color;345 cfmt.color = res->entry_sel_text_fg_color; 346 346 347 347 gfx_text_rect(res->font, &cpos, &cfmt, entry->text + off1, &sel); … … 351 351 sel.p1.y += ui_entry_sel_vpad; 352 352 353 rc = gfx_set_color(res->gc, res->entry_ fg_color);353 rc = gfx_set_color(res->gc, res->entry_sel_text_bg_color); 354 354 if (rc != EOK) 355 355 goto error; -
uspace/lib/ui/src/resource.c
r80d4aea r6df564c 80 80 gfx_color_t *entry_bg_color = NULL; 81 81 gfx_color_t *entry_act_bg_color = NULL; 82 gfx_color_t *entry_sel_text_fg_color = NULL; 83 gfx_color_t *entry_sel_text_bg_color = NULL; 82 84 errno_t rc; 83 85 … … 183 185 184 186 rc = gfx_color_new_rgb_i16(0xc8c8, 0xc8c8, 0xc8c8, &entry_act_bg_color); 187 if (rc != EOK) 188 goto error; 189 190 rc = gfx_color_new_rgb_i16(0xffff, 0xffff, 0xffff, 191 &entry_sel_text_fg_color); 192 if (rc != EOK) 193 goto error; 194 195 rc = gfx_color_new_rgb_i16(0, 0, 0xffff, &entry_sel_text_bg_color); 185 196 if (rc != EOK) 186 197 goto error; … … 214 225 resource->entry_bg_color = entry_bg_color; 215 226 resource->entry_act_bg_color = entry_act_bg_color; 227 resource->entry_sel_text_fg_color = entry_sel_text_fg_color; 228 resource->entry_sel_text_bg_color = entry_sel_text_bg_color; 216 229 217 230 *rresource = resource; … … 259 272 if (entry_bg_color != NULL) 260 273 gfx_color_delete(entry_bg_color); 274 if (entry_sel_text_fg_color != NULL) 275 gfx_color_delete(entry_sel_text_fg_color); 276 if (entry_sel_text_bg_color != NULL) 277 gfx_color_delete(entry_sel_text_bg_color); 261 278 if (entry_act_bg_color != NULL) 262 279 gfx_color_delete(entry_act_bg_color); … … 299 316 gfx_color_t *entry_fg_color = NULL; 300 317 gfx_color_t *entry_bg_color = NULL; 318 gfx_color_t *entry_sel_text_fg_color = NULL; 319 gfx_color_t *entry_sel_text_bg_color = NULL; 301 320 gfx_color_t *entry_act_bg_color = NULL; 302 321 errno_t rc; … … 388 407 389 408 rc = gfx_color_new_ega(0x1b, &entry_bg_color); 409 if (rc != EOK) 410 goto error; 411 412 rc = gfx_color_new_ega(0x20, &entry_sel_text_fg_color); 413 if (rc != EOK) 414 goto error; 415 416 rc = gfx_color_new_ega(0x20, &entry_sel_text_bg_color); 390 417 if (rc != EOK) 391 418 goto error; … … 423 450 resource->entry_bg_color = entry_bg_color; 424 451 resource->entry_act_bg_color = entry_act_bg_color; 452 resource->entry_sel_text_fg_color = entry_sel_text_fg_color; 453 resource->entry_sel_text_bg_color = entry_sel_text_bg_color; 425 454 426 455 *rresource = resource; … … 470 499 if (entry_act_bg_color != NULL) 471 500 gfx_color_delete(entry_act_bg_color); 501 if (entry_sel_text_fg_color != NULL) 502 gfx_color_delete(entry_sel_text_fg_color); 503 if (entry_sel_text_bg_color != NULL) 504 gfx_color_delete(entry_sel_text_bg_color); 472 505 473 506 if (tface != NULL) … … 525 558 gfx_color_delete(resource->entry_bg_color); 526 559 gfx_color_delete(resource->entry_act_bg_color); 560 gfx_color_delete(resource->entry_sel_text_fg_color); 561 gfx_color_delete(resource->entry_sel_text_bg_color); 527 562 528 563 gfx_font_close(resource->font);
Note:
See TracChangeset
for help on using the changeset viewer.