Fixed labels
This commit is contained in:
@ -44,7 +44,7 @@ class WhStatisticsText : public virtual espgui::TextInterface { public: std::str
|
||||
{
|
||||
if (battery::bootBatWh)
|
||||
{
|
||||
return fmt::format("&s&1{}Wh => &2{}Wh &6({})", (int)*battery::bootBatWh, (int)getRemainingWattHours(), (int)getRemainingWattHours() - (int)battery::bootBatWh.value());
|
||||
return fmt::format("&s&2{}Wh => &1{}Wh &6({})", (int)*battery::bootBatWh, (int)getRemainingWattHours(), (int)getRemainingWattHours() - (int)battery::bootBatWh.value());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@ -126,11 +126,11 @@ void BatteryMenu::redraw()
|
||||
m_doubleProgressBarBatPercentage.redraw(batPercent, *battery::bootBatPercentage);
|
||||
|
||||
tft.setTextFont(2);
|
||||
tft.setTextColor(TFT_DARKGREY);
|
||||
tft.setTextColor(TFT_DARKGREY, TFT_BLACK);
|
||||
m_batPercentNowLabel.redraw(fmt::format("{:.2f} %", batPercent));
|
||||
m_batPercentBootLabel.redraw(fmt::format("{:.2f} %", *battery::bootBatPercentage));
|
||||
tft.setTextFont(4);
|
||||
tft.setTextColor(TFT_WHITE);
|
||||
tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,6 @@ public:
|
||||
|
||||
private:
|
||||
bobbygui::DoubleProgressBar m_doubleProgressBarBatPercentage{75, 68, 90, 24, 0, 100, TFT_RED, TFT_GREEN};
|
||||
espgui::Label m_batPercentNowLabel {170, 67};
|
||||
espgui::Label m_batPercentBootLabel{170, 83};
|
||||
espgui::Label m_batPercentNowLabel {170, 68};
|
||||
espgui::Label m_batPercentBootLabel{170, 82};
|
||||
};
|
||||
|
Reference in New Issue
Block a user