mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
metronome: increase rectangle sizes to use a greater portion of the screen
Change-Id: I6c0b3faa173f5b68282c8e75b039e61d2362f749
This commit is contained in:
parent
4ebf2edf32
commit
e3fb41919d
1 changed files with 9 additions and 6 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue