clang format fix

This commit is contained in:
Arthur Tazhitdinov 2026-01-20 08:58:38 +05:00
parent 27176da811
commit 4bd7232948
2 changed files with 4 additions and 7 deletions

View File

@ -42,9 +42,8 @@ void ScreenComponents::drawBattery(const GfxRenderer& renderer, const int left,
renderer.fillRect(x + 2, y + 2, filledWidth, batteryHeight - 4); renderer.fillRect(x + 2, y + 2, filledWidth, batteryHeight - 4);
} }
ScreenComponents::PopupLayout ScreenComponents::drawPopup(const GfxRenderer& renderer, const char* message, ScreenComponents::PopupLayout ScreenComponents::drawPopup(const GfxRenderer& renderer, const char* message, const int y,
const int y, const int minWidth, const int minWidth, const int minHeight) {
const int minHeight) {
const int textWidth = renderer.getTextWidth(UI_12_FONT_ID, message, EpdFontFamily::BOLD); const int textWidth = renderer.getTextWidth(UI_12_FONT_ID, message, EpdFontFamily::BOLD);
constexpr int margin = 16; constexpr int margin = 16;
const int contentWidth = textWidth > minWidth ? textWidth : minWidth; const int contentWidth = textWidth > minWidth ? textWidth : minWidth;
@ -66,8 +65,7 @@ ScreenComponents::PopupLayout ScreenComponents::drawPopup(const GfxRenderer& ren
return {x, y, w, h, barX, barY, barWidth, barHeight}; return {x, y, w, h, barX, barY, barWidth, barHeight};
} }
void ScreenComponents::fillPopupProgress(const GfxRenderer& renderer, const PopupLayout& layout, void ScreenComponents::fillPopupProgress(const GfxRenderer& renderer, const PopupLayout& layout, const int progress) {
const int progress) {
int fillWidth = layout.barWidth * progress / 100; int fillWidth = layout.barWidth * progress / 100;
if (fillWidth < 0) { if (fillWidth < 0) {
fillWidth = 0; fillWidth = 0;

View File

@ -26,8 +26,7 @@ class ScreenComponents {
static void drawBattery(const GfxRenderer& renderer, int left, int top, bool showPercentage = true); static void drawBattery(const GfxRenderer& renderer, int left, int top, bool showPercentage = true);
static PopupLayout drawPopup(const GfxRenderer& renderer, const char* message, int y = 117, static PopupLayout drawPopup(const GfxRenderer& renderer, const char* message, int y = 117,
int minWidth = POPUP_DEFAULT_MIN_WIDTH, int minWidth = POPUP_DEFAULT_MIN_WIDTH, int minHeight = POPUP_DEFAULT_MIN_HEIGHT);
int minHeight = POPUP_DEFAULT_MIN_HEIGHT);
static void fillPopupProgress(const GfxRenderer& renderer, const PopupLayout& layout, int progress); static void fillPopupProgress(const GfxRenderer& renderer, const PopupLayout& layout, int progress);