Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

The calendar couldn't handle a non-default font in some occasions


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4047 a1c6a512-1295-4272-9138-f99709370657

+22 -12
+22 -12
apps/plugins/calendar.c
··· 46 46 int firstday; /* first (w)day of month */ 47 47 int lastday; /* last (w)day of month */ 48 48 }; 49 + 50 + static bool use_system_font = false; 51 + 49 52 /* leap year -- account for gregorian reformation in 1752 */ 50 53 static int is_leap_year(int yr) 51 54 { ··· 69 72 #endif 70 73 rb->lcd_getstringsize("A",&w,&h); 71 74 if ( ((w * 14) > LCD_WIDTH) || ((h * 7) > LCD_HEIGHT) ) 75 + { 72 76 rb->lcd_setfont(FONT_SYSFIXED); 77 + use_system_font = true; 78 + } 73 79 rb->lcd_clear_display(); 74 80 #ifdef HAVE_RTC 75 81 tm = rb->get_time(); ··· 390 396 } 391 397 } 392 398 rb->lcd_clear_display(); 399 + if(use_system_font) 400 + rb->lcd_setfont(FONT_SYSFIXED); 393 401 if (saved) 394 402 rb->lcd_puts(0,0,"Event added"); 395 403 else ··· 407 415 rb->lcd_puts(0,0,"Remove : Up"); 408 416 rb->lcd_puts(0,1,"Edit : Down"); 409 417 rb->lcd_puts(0,2,"New :"); 410 - rb->lcd_puts(6,3,"weekly : Left"); 411 - rb->lcd_puts(6,4,"monthly : Play"); 412 - rb->lcd_puts(6,5,"annually : Right"); 413 - rb->lcd_puts(6,6,"one off : On"); 418 + rb->lcd_puts(2,3,"weekly : Left"); 419 + rb->lcd_puts(2,4,"monthly : Play"); 420 + rb->lcd_puts(2,5,"annually : Right"); 421 + rb->lcd_puts(2,6,"one off : On"); 414 422 } 415 423 else 416 424 { 417 425 rb->lcd_puts(0,0,"New :"); 418 - rb->lcd_puts(6,1,"weekly : Left"); 419 - rb->lcd_puts(6,2,"monthly : Play"); 420 - rb->lcd_puts(6,3,"anualy : Right"); 421 - rb->lcd_puts(6,4,"one off : On"); 426 + rb->lcd_puts(2,1,"weekly : Left"); 427 + rb->lcd_puts(2,2,"monthly : Play"); 428 + rb->lcd_puts(2,3,"anualy : Right"); 429 + rb->lcd_puts(2,4,"one off : On"); 422 430 } 423 431 rb->lcd_update(); 424 432 while (!exit) ··· 430 438 431 439 case BUTTON_LEFT: 432 440 add_memo(shown,0); 433 - return false; 441 + return false; 434 442 435 443 case BUTTON_PLAY: 436 444 add_memo(shown,1); 437 - return false; 445 + return false; 438 446 439 447 case BUTTON_RIGHT: 440 448 add_memo(shown,2); 441 - return false; 449 + return false; 442 450 443 451 case BUTTON_ON: 444 452 add_memo(shown,3); 445 - return false; 453 + return false; 446 454 447 455 case BUTTON_DOWN: 448 456 if (memos_in_shown_memory > 0) ··· 450 458 if(rb->kbd_input(memos[pointer_array[change]].message, 451 459 sizeof memos[pointer_array[change]].message) != -1) 452 460 save_memo(pointer_array[change],true,shown); 461 + if(use_system_font) 462 + rb->lcd_setfont(FONT_SYSFIXED); 453 463 exit = true; 454 464 } 455 465 break;