Skip to content

Commit 0142783

Browse files
authored
🚸 Fix more MarlinUI title centering (#26440)
Followup to #26339
1 parent 006768a commit 0142783

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

Marlin/src/lcd/HD44780/marlinui_HD44780.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ void MarlinUI::draw_status_screen() {
11791179
int8_t llen = ftpl ? expand_u8str(estr, ftpl, itemIndex, itemStringC, itemStringF, n - vlen) : 0;
11801180

11811181
bool mv_colon = false;
1182-
if (vlen) {
1182+
if (vlen && !center) {
11831183
// Move the leading colon from the value to the label below
11841184
mv_colon = (*vstr == ':');
11851185
// Shorter value, wider label

Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ void MarlinUI::draw_status_screen() {
983983
int8_t llen = ftpl ? expand_u8str(estr, ftpl, itemIndex, itemStringC, itemStringF, n - vlen) : 0;
984984

985985
bool mv_colon = false;
986-
if (vlen) {
986+
if (vlen && !center) {
987987
// Move the leading colon from the value to the label below
988988
mv_colon = (*vstr == ':');
989989
// Shorter value, wider label

Marlin/src/lcd/e3v2/creality/dwin.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,19 @@ void hmiMoveDone(const AxisEnum axis) {
13841384
dwinUpdateLCD();
13851385
return;
13861386
}
1387-
LIMIT(hmiValues.offset_value, (PROBE_OFFSET_ZMIN) * 100, (PROBE_OFFSET_ZMAX) * 100);
1387+
1388+
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) && defined(PROBE_OFFSET_ZMIN)
1389+
#define _OFFSET_ZMIN (PROBE_OFFSET_ZMIN)
1390+
#else
1391+
#define _OFFSET_ZMIN -20
1392+
#endif
1393+
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) && defined(PROBE_OFFSET_ZMAX)
1394+
#define _OFFSET_ZMAX (PROBE_OFFSET_ZMAX)
1395+
#else
1396+
#define _OFFSET_ZMAX 20
1397+
#endif
1398+
LIMIT(hmiValues.offset_value, _OFFSET_ZMIN * 100, _OFFSET_ZMAX * 100);
1399+
13881400
last_zoffset = dwin_zoffset;
13891401
dwin_zoffset = hmiValues.offset_value / 100.0f;
13901402
#if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)

Marlin/src/lcd/e3v2/marlinui/ui_common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ void MarlinUI::draw_status_message(const bool blink) {
324324
int8_t vlen = vstr ? utf8_strlen(vstr) : 0;
325325

326326
bool mv_colon = false;
327-
if (vlen) {
327+
if (vlen && !center) {
328328
// Move the leading colon from the value to the label below
329329
mv_colon = (*vstr == ':');
330330
// Shorter value, wider label

Marlin/src/lcd/e3v2/proui/dwin.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@
3939
#include "../../../feature/leds/leds.h"
4040
#endif
4141

42-
#if ANY(BABYSTEPPING, HAS_BED_PROBE)
43-
#define HAS_ZOFFSET_ITEM 1
44-
#if !HAS_BED_PROBE
45-
#define JUST_BABYSTEP 1
46-
#endif
47-
#endif
48-
4942
namespace GET_LANG(LCD_LANGUAGE) {
5043
#define _MSG_PREHEAT(N) \
5144
LSTR MSG_PREHEAT_##N = _UxGT("Preheat ") PREHEAT_## N ##_LABEL; \

0 commit comments

Comments
 (0)