mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Merge pull request #290 from adam2872/Modern-battery-icon
Slightly better battery icon
This commit is contained in:
commit
fa0456549a
1 changed files with 2 additions and 2 deletions
|
|
@ -107,8 +107,8 @@ void UITask::renderBatteryIndicator(uint16_t batteryMilliVolts) {
|
||||||
_display->fillRect(iconX + iconWidth, iconY + (iconHeight / 4), 3, iconHeight / 2);
|
_display->fillRect(iconX + iconWidth, iconY + (iconHeight / 4), 3, iconHeight / 2);
|
||||||
|
|
||||||
// fill the battery based on the percentage
|
// fill the battery based on the percentage
|
||||||
int fillWidth = (batteryPercentage * (iconWidth - 2)) / 100;
|
int fillWidth = (batteryPercentage * (iconWidth - 4)) / 100;
|
||||||
_display->fillRect(iconX + 1, iconY + 1, fillWidth, iconHeight - 2);
|
_display->fillRect(iconX + 2, iconY + 2, fillWidth, iconHeight - 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UITask::renderCurrScreen() {
|
void UITask::renderCurrScreen() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue