1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

Merge pull request #1220 from ScarsFun/master

hide sign in spinbox widget if only positive values
This commit is contained in:
Gabor Kiss-Vamosi 2019-10-09 14:26:31 +02:00 committed by GitHub
commit 1016b8bb47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -406,9 +406,11 @@ static void lv_spinbox_updatevalue(lv_obj_t * spinbox)
memset(buf, 0, sizeof(buf));
char * buf_p = buf;
/*Add the sign*/
(*buf_p) = ext->value >= 0 ? '+' : '-';
buf_p++;
if (ext->range_min < 0) { // hide sign if there are only positive values
/*Add the sign*/
(*buf_p) = ext->value >= 0 ? '+' : '-';
buf_p++;
}
int i;
/*padding left*/