Fix song-name trailing ghost by clearing the full text row before redraw.

When switching from a longer title to a shorter one, the old gradient-only clear left uncovered glyph fragments outside the pill bounds.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yuquanjun 2026-09-10 10:46:11 +08:00
parent b65b762d92
commit 295a2a6fa3
1 changed files with 17 additions and 7 deletions

View File

@ -522,6 +522,15 @@ void show_Param(const LEBEL_UI *UI, GUI_SWITCH *Group)
UI_GetFocusGrad(GUI_MODE_PARAM, &c_top, &c_bot);
x1 = (uint16_t)(UI->x + 10);
x2 = (uint16_t)(UI->x + UI->w - 10);
/* 修复曲目名尾部残留旧名比新名长时只填渐变胶囊x+25 ~ x+w-40
x+10 ~ x+w-10
*/
LCD_FillByColor(x1, row_y, x2, (uint16_t)(row_y + row_h), c_top);
LCD_FillRoundRectGradient(
UI->x+25, row_y,
UI->x + UI->w-40-(UI->x+25),
@ -536,10 +545,15 @@ void show_Param(const LEBEL_UI *UI, GUI_SWITCH *Group)
strcpy(Textstr_new, LocalSongNameGbk[Group->Current]);
else
GET_ParamNum_Str(Group->Current, 0, Textstr_new, Group->Id);
x1 = (uint16_t)(UI->x + 10);
x2 = (uint16_t)(UI->x + UI->w - 10);
UI_DrawIndexedName_Mixed(x1, x2, text_y, NumBuf, Textstr_new,
WHITE, BLACK, UI->Text_size);
/* 补画左右三角(几何与 label_ModeSelece_ui 一致) */
{
uint16_t row_cy = (uint16_t)(row_y + row_h / 2);
UI_DrawTriLeft((uint16_t)(UI->x + 5), row_cy);
UI_DrawTriRight((uint16_t)(UI->x + UI->w - 5 - UI0902_TRI_R_W), row_cy);
}
}
@ -867,12 +881,8 @@ void label_ModeSelece_ui(const LEBEL_UI *UI,GUI_SWITCH * Group)
paramCurData = &ParamGuiData[SONG_MODE_PARAM];
}
/* 左右三角由 show_Param 末尾统一补画(整行清除后必须重画) */
show_Param(&UI_Label[GUI_MODE_PARAM], paramCurData);
{
uint16_t row_cy = UI->y + UI0902_TAB_H + 4 + (UI->h - UI0902_TAB_H - 4) / 2;
UI_DrawTriLeft(UI->x + 5, row_cy);
UI_DrawTriRight((uint16_t)(UI->x + UI->w - 5 - UI0902_TRI_R_W), row_cy);
}
}
void label_TimbreSelece_ui(const LEBEL_UI *UI, GUI_SWITCH * Group)