mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-05 07:07:38 +03:00
clang format fix
This commit is contained in:
parent
27176da811
commit
4bd7232948
@ -42,9 +42,8 @@ void ScreenComponents::drawBattery(const GfxRenderer& renderer, const int left,
|
||||
renderer.fillRect(x + 2, y + 2, filledWidth, batteryHeight - 4);
|
||||
}
|
||||
|
||||
ScreenComponents::PopupLayout ScreenComponents::drawPopup(const GfxRenderer& renderer, const char* message,
|
||||
const int y, const int minWidth,
|
||||
const int minHeight) {
|
||||
ScreenComponents::PopupLayout ScreenComponents::drawPopup(const GfxRenderer& renderer, const char* message, const int y,
|
||||
const int minWidth, const int minHeight) {
|
||||
const int textWidth = renderer.getTextWidth(UI_12_FONT_ID, message, EpdFontFamily::BOLD);
|
||||
constexpr int margin = 16;
|
||||
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};
|
||||
}
|
||||
|
||||
void ScreenComponents::fillPopupProgress(const GfxRenderer& renderer, const PopupLayout& layout,
|
||||
const int progress) {
|
||||
void ScreenComponents::fillPopupProgress(const GfxRenderer& renderer, const PopupLayout& layout, const int progress) {
|
||||
int fillWidth = layout.barWidth * progress / 100;
|
||||
if (fillWidth < 0) {
|
||||
fillWidth = 0;
|
||||
|
||||
@ -26,8 +26,7 @@ class ScreenComponents {
|
||||
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,
|
||||
int minWidth = POPUP_DEFAULT_MIN_WIDTH,
|
||||
int minHeight = POPUP_DEFAULT_MIN_HEIGHT);
|
||||
int minWidth = POPUP_DEFAULT_MIN_WIDTH, int minHeight = POPUP_DEFAULT_MIN_HEIGHT);
|
||||
|
||||
static void fillPopupProgress(const GfxRenderer& renderer, const PopupLayout& layout, int progress);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user