Update draw_homescreen_simplified.cpp

Style corrected
This commit is contained in:
Leo
2025-01-28 14:42:24 +02:00
parent 71551e6db5
commit 1ed2299ce0

View File

@@ -12,32 +12,33 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) {
bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled); bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled);
// Flip and switch buttons accordingly // Flip and switch buttons accordingly
OLED::drawArea(isFlipped ? 54: 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF:buttonAF) : (isReverse ? buttonB:buttonA) ); // Flip and switch buttons accordingly
OLED::drawArea(isFlipped ? 12:42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF:buttonBF) : (isReverse ? buttonA:buttonB) ); OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA));
OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB));
if (displayTemp || tipDisconnected) {
// draw temp over the start soldering button if (displayTemp || tipDisconnected) {
// Location changes on screen rotation // draw temp over the start soldering button
// in right handed mode we want to draw over the first part // Location changes on screen rotation
OLED::fillArea(isReverse? (isFlipped?14:42):(isFlipped?55:0), 0, 41, 16, 0); // clear the area // in right handed mode we want to draw over the first part
OLED::setCursor(isReverse? (isFlipped?15:43):(isFlipped?56:0), 0); OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area
// If tip is connected draw the temp, otherwise - the notification OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0);
if (!tipDisconnected) { // If tip is connected draw the temp, otherwise - the notification
// Draw-in the temp if (!tipDisconnected) {
if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) { // Draw-in the temp
ui_draw_tip_temperature(false, FontStyle::LARGE); // draw in the temp if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) {
} ui_draw_tip_temperature(false, FontStyle::LARGE); // draw in the temp
} else { }
// Draw-in the missing tip symbol } else {
if (isReverse) { // Draw-in the missing tip symbol
OLED::drawArea(isFlipped?12:42, 0, 42, 16, isFlipped?disconnectedTipF:disconnectedTip); if (isReverse) {
} else { OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip);
OLED::drawArea(isFlipped? 54:0, 0, 42, 16, isFlipped?disconnectedTipF:disconnectedTip); } else {
} OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip);
} }
} }
OLED::setCursor(isFlipped ? 0:84, 0); }
ui_draw_power_source_icon(); OLED::setCursor(isFlipped ? 0 : 84, 0);
ui_draw_power_source_icon();
} }
#endif #endif