fix(color): Fix top bar timer widget names sometimes having garbage characters (#2835)
Limit length of name text drawn in small size timer widget to prevent random characters appearing
This commit is contained in:
@@ -112,7 +112,7 @@ class TimerWidget : public Widget
|
|||||||
}
|
}
|
||||||
// name
|
// name
|
||||||
if (ZLEN(timerData.name) > 0) { // user name exist
|
if (ZLEN(timerData.name) > 0) { // user name exist
|
||||||
dc->drawText(2, 0, timerData.name, FONT(XS) | COLOR_THEME_PRIMARY2);
|
dc->drawSizedText(2, 0, timerData.name, LEN_TIMER_NAME, FONT(XS) | COLOR_THEME_PRIMARY2);
|
||||||
} else { // user name not exist "TMRn"
|
} else { // user name not exist "TMRn"
|
||||||
drawStringWithIndex(dc, 2, 0, "TMR", index + 1,
|
drawStringWithIndex(dc, 2, 0, "TMR", index + 1,
|
||||||
FONT(XS) | COLOR_THEME_PRIMARY2);
|
FONT(XS) | COLOR_THEME_PRIMARY2);
|
||||||
|
|||||||
Reference in New Issue
Block a user