Drop TALL_FONT_CORRECTION
This commit is contained in:
@ -285,15 +285,15 @@ void lcd_impl_status_screen_0() {
|
||||
//
|
||||
// SD Card Symbol
|
||||
//
|
||||
if (card.isFileOpen() && PAGE_CONTAINS(42 - (TALL_FONT_CORRECTION), 51 - (TALL_FONT_CORRECTION))) {
|
||||
if (card.isFileOpen() && PAGE_CONTAINS(42, 51)) {
|
||||
// Upper box
|
||||
u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7); // 42-48 (or 41-47)
|
||||
u8g.drawBox(42, 42, 8, 7); // 42-48 (or 41-47)
|
||||
// Right edge
|
||||
u8g.drawBox(50, 44 - (TALL_FONT_CORRECTION), 2, 5); // 44-48 (or 43-47)
|
||||
u8g.drawBox(50, 44, 2, 5); // 44-48 (or 43-47)
|
||||
// Bottom hollow box
|
||||
u8g.drawFrame(42, 49 - (TALL_FONT_CORRECTION), 10, 4); // 49-52 (or 48-51)
|
||||
u8g.drawFrame(42, 49, 10, 4); // 49-52 (or 48-51)
|
||||
// Corner pixel
|
||||
u8g.drawPixel(50, 43 - (TALL_FONT_CORRECTION)); // 43 (or 42)
|
||||
u8g.drawPixel(50, 43); // 43 (or 42)
|
||||
}
|
||||
#endif // SDSUPPORT
|
||||
|
||||
@ -304,10 +304,10 @@ void lcd_impl_status_screen_0() {
|
||||
#define PROGRESS_BAR_X 54
|
||||
#define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
|
||||
|
||||
if (PAGE_CONTAINS(49, 52 - (TALL_FONT_CORRECTION))) // 49-52 (or 49-51)
|
||||
if (PAGE_CONTAINS(49, 52)) // 49-52 (or 49-51)
|
||||
u8g.drawFrame(
|
||||
PROGRESS_BAR_X, 49,
|
||||
PROGRESS_BAR_WIDTH, 4 - (TALL_FONT_CORRECTION)
|
||||
PROGRESS_BAR_WIDTH, 4
|
||||
);
|
||||
|
||||
#if DISABLED(LCD_SET_PROGRESS_MANUALLY)
|
||||
@ -320,10 +320,10 @@ void lcd_impl_status_screen_0() {
|
||||
// Progress bar solid part
|
||||
//
|
||||
|
||||
if (PAGE_CONTAINS(50, 51 - (TALL_FONT_CORRECTION))) // 50-51 (or just 50)
|
||||
if (PAGE_CONTAINS(50, 51)) // 50-51 (or just 50)
|
||||
u8g.drawBox(
|
||||
PROGRESS_BAR_X + 1, 50,
|
||||
(uint16_t)((PROGRESS_BAR_WIDTH - 2) * progress_bar_percent * 0.01), 2 - (TALL_FONT_CORRECTION)
|
||||
(uint16_t)((PROGRESS_BAR_WIDTH - 2) * progress_bar_percent * 0.01), 2
|
||||
);
|
||||
|
||||
//
|
||||
|
@ -96,10 +96,6 @@
|
||||
#define DOG_CHAR_HEIGHT_EDIT DOG_CHAR_HEIGHT
|
||||
#endif
|
||||
|
||||
#ifndef TALL_FONT_CORRECTION
|
||||
#define TALL_FONT_CORRECTION 0
|
||||
#endif
|
||||
|
||||
#define START_COL 0
|
||||
|
||||
U8G_CLASS u8g(U8G_PARAM);
|
||||
@ -294,13 +290,12 @@ void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
|
||||
#if ENABLED(ULTIPANEL)
|
||||
|
||||
uint8_t row_y1, row_y2;
|
||||
uint8_t constexpr row_height = DOG_CHAR_HEIGHT + 2 * (TALL_FONT_CORRECTION);
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
|
||||
void lcd_implementation_hotend_status(const uint8_t row, const uint8_t extruder) {
|
||||
row_y1 = row * row_height + 1;
|
||||
row_y2 = row_y1 + row_height - 1;
|
||||
row_y1 = row * (DOG_CHAR_HEIGHT) + 1;
|
||||
row_y2 = row_y1 + DOG_CHAR_HEIGHT - 1;
|
||||
|
||||
if (!PAGE_CONTAINS(row_y1 + 1, row_y2 + 2)) return;
|
||||
|
||||
@ -319,8 +314,8 @@ void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
|
||||
|
||||
// Set the colors for a menu item based on whether it is selected
|
||||
static bool mark_as_selected(const uint8_t row, const bool isSelected) {
|
||||
row_y1 = row * row_height + 1;
|
||||
row_y2 = row_y1 + row_height - 1;
|
||||
row_y1 = row * (DOG_CHAR_HEIGHT) + 1;
|
||||
row_y2 = row_y1 + DOG_CHAR_HEIGHT - 1;
|
||||
|
||||
if (!PAGE_CONTAINS(row_y1 + 1, row_y2 + 2)) return false;
|
||||
|
||||
@ -330,7 +325,7 @@ void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
|
||||
u8g.drawHLine(0, row_y2 + 2, LCD_PIXEL_WIDTH);
|
||||
#else
|
||||
u8g.setColorIndex(1); // black on white
|
||||
u8g.drawBox(0, row_y1 + 2, LCD_PIXEL_WIDTH, row_height - 1);
|
||||
u8g.drawBox(0, row_y1 + 2, LCD_PIXEL_WIDTH, DOG_CHAR_HEIGHT - 1);
|
||||
u8g.setColorIndex(0); // white on black
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user