mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Update draw_homescreen_simplified.cpp
Style corrected
This commit is contained in:
@@ -12,32 +12,33 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) {
|
||||
bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled);
|
||||
|
||||
// Flip and switch buttons accordingly
|
||||
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
|
||||
// Location changes on screen rotation
|
||||
// in right handed mode we want to draw over the first part
|
||||
OLED::fillArea(isReverse? (isFlipped?14:42):(isFlipped?55:0), 0, 41, 16, 0); // clear the area
|
||||
OLED::setCursor(isReverse? (isFlipped?15:43):(isFlipped?56:0), 0);
|
||||
// If tip is connected draw the temp, otherwise - the notification
|
||||
if (!tipDisconnected) {
|
||||
// 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
|
||||
if (isReverse) {
|
||||
OLED::drawArea(isFlipped?12:42, 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();
|
||||
// Flip and switch buttons accordingly
|
||||
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
|
||||
// Location changes on screen rotation
|
||||
// in right handed mode we want to draw over the first part
|
||||
OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area
|
||||
OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0);
|
||||
// If tip is connected draw the temp, otherwise - the notification
|
||||
if (!tipDisconnected) {
|
||||
// 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
|
||||
if (isReverse) {
|
||||
OLED::drawArea(isFlipped ? 12 : 42, 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();
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user