From d2d03e157bfeb85a77a1a4c222de8e219bba2886 Mon Sep 17 00:00:00 2001 From: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 18 Nov 2023 07:23:35 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Fix=20LCD=20centering?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow up to https://github.com/MarlinFirmware/Marlin/pull/26339. Applies same fix from https://github.com/MarlinFirmware/Marlin/pull/26415. Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com> --- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 2 +- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 2 +- Marlin/src/lcd/e3v2/marlinui/ui_common.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 2564d4f96e23..155ae581f06a 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -1179,7 +1179,7 @@ void MarlinUI::draw_status_screen() { int8_t llen = ftpl ? expand_u8str(estr, ftpl, itemIndex, itemStringC, itemStringF, n - vlen) : 0; bool mv_colon = false; - if (vlen) { + if (vlen && !center) { // Move the leading colon from the value to the label below mv_colon = (*vstr == ':'); // Shorter value, wider label diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index 4a6a6eec4722..b29653f7b01f 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -983,7 +983,7 @@ void MarlinUI::draw_status_screen() { int8_t llen = ftpl ? expand_u8str(estr, ftpl, itemIndex, itemStringC, itemStringF, n - vlen) : 0; bool mv_colon = false; - if (vlen) { + if (vlen && !center) { // Move the leading colon from the value to the label below mv_colon = (*vstr == ':'); // Shorter value, wider label diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp index cc9d7b2e7b31..f9318c75b9bb 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp @@ -324,7 +324,7 @@ void MarlinUI::draw_status_message(const bool blink) { int8_t vlen = vstr ? utf8_strlen(vstr) : 0; bool mv_colon = false; - if (vlen) { + if (vlen && !center) { // Move the leading colon from the value to the label below mv_colon = (*vstr == ':'); // Shorter value, wider label