From e3fb41919d3ac12295aee3bf1ae6ae460688c0b1 Mon Sep 17 00:00:00 2001 From: Paul Sauro Date: Mon, 7 Apr 2025 22:53:10 +0200 Subject: [PATCH] metronome: increase rectangle sizes to use a greater portion of the screen Change-Id: I6c0b3faa173f5b68282c8e75b039e61d2362f749 --- apps/plugins/metronome.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c index 001d4286dd..dbbb2b40ac 100644 --- a/apps/plugins/metronome.c +++ b/apps/plugins/metronome.c @@ -847,6 +847,9 @@ static void metronome_draw(struct screen* display, int state) ps = part; display->clear_display(); display->setfont(FONT_SYSFIXED); + int rectangle_height = display->lcdheight - ((SYSFONT_HEIGHT + 1) * 7); + if (rectangle_height < 12) + rectangle_height = 12; switch(state) { case 0: @@ -863,18 +866,18 @@ static void metronome_draw(struct screen* display, int state) case 1: if((beat+1) % 2 == 0) display->fillrect( display->lcdwidth/2, 0 - , display->lcdwidth, 12 ); + , display->lcdwidth, rectangle_height ); else display->fillrect( 0, 0 - , display->lcdwidth/2-1, 12 ); + , display->lcdwidth/2-1, rectangle_height ); break; case 2: if((beat+1) % 2 == 0) - display->fillrect( display->lcdwidth/2, display->lcdheight-13 - , display->lcdwidth, 12 ); + display->fillrect( display->lcdwidth/2, display->lcdheight - rectangle_height - 1 + , display->lcdwidth, rectangle_height ); else - display->fillrect( 0, display->lcdheight-13 - , display->lcdwidth/2-1, 12 ); + display->fillrect( 0, display->lcdheight - rectangle_height - 1 + , display->lcdwidth/2-1, rectangle_height ); break; case 3: display->puts((textlen-3)/2,0, "o.O");