Update marlinui_DOGM.cpp

This commit is contained in:
Scott Lahteine 2020-11-12 22:29:35 -06:00 committed by GitHub
parent ca9f27dc62
commit c056c2e3d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -461,11 +461,8 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
void MenuItem_sdbase::draw(const bool sel, const uint8_t row, PGM_P const, CardReader &theCard, const bool isDir) { void MenuItem_sdbase::draw(const bool sel, const uint8_t row, PGM_P const, CardReader &theCard, const bool isDir) {
if (mark_as_selected(row, sel)) { if (mark_as_selected(row, sel)) {
uint8_t maxlen = LCD_WIDTH; const uint8_t maxlen = LCD_WIDTH - isDir;
if (isDir) { if (isDir) lcd_put_wchar(LCD_STR_FOLDER[0]);
lcd_put_wchar(LCD_STR_FOLDER[0]);
maxlen--;
}
const pixel_len_t pixw = maxlen * (MENU_FONT_WIDTH); const pixel_len_t pixw = maxlen * (MENU_FONT_WIDTH);
pixel_len_t n = pixw - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), pixw); pixel_len_t n = pixw - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), pixw);
while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' '); while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');