forked from len0rd/rockbox
Clock plugin : centered the binary plugin, moved the AM/PM mark to the right on digital display, reduced the thickness of the pseudo antialiasing for analog clock
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14181 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
75e2f19de3
commit
14d276121a
4 changed files with 16 additions and 13 deletions
|
@ -48,18 +48,19 @@ void digital_clock_draw(struct screen* display,
|
|||
else
|
||||
display_colon=true;
|
||||
|
||||
if(settings->general.hour_format==H12){/* AM/PM format */
|
||||
if(hour>12){
|
||||
buffer_printf(buffer, buffer_pos, "P");/* AM */
|
||||
/* readjust the hour to 12-hour format
|
||||
* ( 13:00+ -> 1:00+ ) */
|
||||
hour -= 12;
|
||||
}else
|
||||
buffer_printf(buffer, buffer_pos, "A");/* AM */
|
||||
}
|
||||
if(settings->general.hour_format==H12 && time->hour>12)/* AM/PM format */
|
||||
hour -= 12;
|
||||
|
||||
buffer_printf(buffer, buffer_pos, "%02d", hour);
|
||||
buffer_printf(buffer, buffer_pos, "%c", display_colon?':':' ');
|
||||
buffer_printf(buffer, buffer_pos, "%02d", time->minute);
|
||||
if(settings->general.hour_format==H12){
|
||||
if(time->hour>12){
|
||||
buffer_printf(buffer, buffer_pos, "P");/* PM */
|
||||
}else{
|
||||
buffer_printf(buffer, buffer_pos, "A");/* AM */
|
||||
}
|
||||
}
|
||||
getstringsize(digits_bitmaps, buffer, &str_w, &str_h);
|
||||
draw_string(display, digits_bitmaps, buffer, (display->width-str_w)/2, 0);
|
||||
if(settings->digital.show_seconds){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue