Changeset ff6e91b in mainline for uspace/lib/ui/src/slider.c
- Timestamp:
- 2021-08-30T20:41:27Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 81ec7e1
- Parents:
- 9b2e20c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/slider.c
r9b2e20c rff6e91b 332 332 gfx_coord_t w, i; 333 333 char *buf; 334 const char *gchar; 335 size_t gcharsz; 334 336 errno_t rc; 335 337 … … 344 346 345 347 w = slider->rect.p1.x - slider->rect.p0.x; 346 buf = malloc(w + 1); 348 gchar = "\u2550"; 349 gcharsz = str_size(gchar); 350 351 buf = malloc(w * gcharsz + 1); 347 352 if (buf == NULL) 348 353 return ENOMEM; 349 354 350 355 for (i = 0; i < w; i++) 351 buf[i] = '=';352 buf[w ] = '\0';356 str_cpy(buf + i * gcharsz, (w - i) * gcharsz + 1, gchar); 357 buf[w * gcharsz] = '\0'; 353 358 354 359 rc = gfx_puttext(slider->res->font, &pos, &fmt, buf);
Note:
See TracChangeset
for help on using the changeset viewer.