Skip to content

Commit

Permalink
🎨 More more lowercase (partial ProUI)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jun 17, 2023
1 parent 78b3426 commit 238951a
Show file tree
Hide file tree
Showing 16 changed files with 224 additions and 224 deletions.
12 changes: 6 additions & 6 deletions Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ bool BedLevelToolsClass::meshvalidate() {
const float v_max = abs(get_max_value()), v_min = abs(get_min_value()), range = _MAX(v_min, v_max);

// Clear background from previous selection and select new square
DWIN_Draw_Rectangle(1, Color_Bg_Black, _MAX(0, padding_x - gridline_width), _MAX(0, padding_y_top - gridline_width), padding_x + total_width_px, padding_y_top + total_width_px);
dwinDrawRectangle(1, Color_Bg_Black, _MAX(0, padding_x - gridline_width), _MAX(0, padding_y_top - gridline_width), padding_x + total_width_px, padding_y_top + total_width_px);
if (selected >= 0) {
const auto selected_y = selected / (GRID_MAX_POINTS_X);
const auto selected_x = selected - (GRID_MAX_POINTS_X) * selected_y;
const auto start_y_px = padding_y_top + selected_y * cell_height_px;
const auto start_x_px = padding_x + selected_x * cell_width_px;
DWIN_Draw_Rectangle(1, Color_White, _MAX(0, start_x_px - gridline_width), _MAX(0, start_y_px - gridline_width), start_x_px + cell_width_px, start_y_px + cell_height_px);
dwinDrawRectangle(1, Color_White, _MAX(0, start_x_px - gridline_width), _MAX(0, start_y_px - gridline_width), start_x_px + cell_width_px, start_y_px + cell_height_px);
}

// Draw value square grid
Expand All @@ -233,7 +233,7 @@ bool BedLevelToolsClass::meshvalidate() {
const auto end_x_px = start_x_px + cell_width_px - 1 - gridline_width;
const auto start_y_px = padding_y_top + ((GRID_MAX_POINTS_Y) - y - 1) * cell_height_px;
const auto end_y_px = start_y_px + cell_height_px - 1 - gridline_width;
DWIN_Draw_Rectangle(1, // RGB565 colors: http://www.barth-dev.de/online/rgb565-color-picker/
dwinDrawRectangle(1, // RGB565 colors: http://www.barth-dev.de/online/rgb565-color-picker/
isnan(bedlevel.z_values[x][y]) ? Color_Grey : ( // gray if undefined
(bedlevel.z_values[x][y] < 0 ?
(uint16_t)round(0x1F * -bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? range : v_min)) << 11 : // red if mesh point value is negative
Expand All @@ -249,7 +249,7 @@ bool BedLevelToolsClass::meshvalidate() {
if (viewer_print_value) {
int8_t offset_x, offset_y = cell_height_px / 2 - 6;
if (isnan(bedlevel.z_values[x][y])) { // undefined
DWIN_Draw_String(false, font6x12, Color_White, Color_Bg_Blue, start_x_px + cell_width_px / 2 - 5, start_y_px + offset_y, F("X"));
dwinDrawString(false, font6x12, Color_White, Color_Bg_Blue, start_x_px + cell_width_px / 2 - 5, start_y_px + offset_y, F("X"));
}
else { // has value
if (GRID_MAX_POINTS_X < 10)
Expand All @@ -258,8 +258,8 @@ bool BedLevelToolsClass::meshvalidate() {
sprintf_P(buf, PSTR("%02i"), (uint16_t)(abs(bedlevel.z_values[x][y] - (int16_t)bedlevel.z_values[x][y]) * 100));
offset_x = cell_width_px / 2 - 3 * (strlen(buf)) - 2;
if (!(GRID_MAX_POINTS_X < 10))
DWIN_Draw_String(false, font6x12, Color_White, Color_Bg_Blue, start_x_px - 2 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, F("."));
DWIN_Draw_String(false, font6x12, Color_White, Color_Bg_Blue, start_x_px + 1 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, buf);
dwinDrawString(false, font6x12, Color_White, Color_Bg_Blue, start_x_px - 2 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, F("."));
dwinDrawString(false, font6x12, Color_White, Color_Bg_Blue, start_x_px + 1 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, buf);
}
safe_delay(10);
LCD_SERIAL.flushTX();
Expand Down
Loading

0 comments on commit 238951a

Please sign in to comment.