summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2009-10-06 13:17:58 +0000
committerTeruaki Kawashima <teru@rockbox.org>2009-10-06 13:17:58 +0000
commit145c679c7d2341a14ca004c38b32f5bd17b2708f (patch)
treee33405dffc64f17b6d67faf39d8c882cb610e4e2 /apps
parentd996804600bb7bd2a025f20b564cdc87654119ea (diff)
downloadrockbox-145c679c7d2341a14ca004c38b32f5bd17b2708f.tar.gz
rockbox-145c679c7d2341a14ca004c38b32f5bd17b2708f.zip
Complete r22917. The icon still overlapped the text slightly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22982 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/recorder/keyboard.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index d87272cfee..f2f5d28508 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -408,7 +408,6 @@ int kbd_input(char* text, int buflen)
408 pm->curfont = FONT_SYSFIXED; 408 pm->curfont = FONT_SYSFIXED;
409 } 409 }
410 410
411 sc->setfont(pm->curfont);
412 /* find max width of keyboard glyphs. 411 /* find max width of keyboard glyphs.
413 * since we're going to be adding spaces, 412 * since we're going to be adding spaces,
414 * max width is at least their width */ 413 * max width is at least their width */
@@ -482,7 +481,7 @@ int kbd_input(char* text, int buflen)
482 { 481 {
483 struct keyboard_parameters *pm = &param[l]; 482 struct keyboard_parameters *pm = &param[l];
484 struct screen *sc = &screens[l]; 483 struct screen *sc = &screens[l];
485 int icon_w; 484 int icon_w, sc_w, sc_h;
486 485
487 pm->text_w = pm->font_w; 486 pm->text_w = pm->font_w;
488 487
@@ -497,10 +496,11 @@ int kbd_input(char* text, int buflen)
497 } 496 }
498 497
499 icon_w = get_icon_width(l); 498 icon_w = get_icon_width(l);
500 pm->max_chars_text = (sc->getwidth() - icon_w * 2) 499 sc_w = sc->getwidth();
501 / pm->text_w; 500 sc_h = sc->getheight();
501 pm->max_chars_text = (sc_w - icon_w * 2 - 2) / pm->text_w;
502 if(pm->max_chars_text < 3 && icon_w > pm->text_w) 502 if(pm->max_chars_text < 3 && icon_w > pm->text_w)
503 pm->max_chars_text = sc->getwidth() / pm->text_w - 2; 503 pm->max_chars_text = sc_w / pm->text_w - 2;
504 504
505 if (!kbd_loaded) 505 if (!kbd_loaded)
506 { 506 {
@@ -509,10 +509,10 @@ int kbd_input(char* text, int buflen)
509 } 509 }
510 else 510 else
511 { 511 {
512 pm->lines = (sc->getheight() - BUTTONBAR_HEIGHT - statusbar_size) 512 pm->lines = (sc_h - BUTTONBAR_HEIGHT - statusbar_size)
513 / pm->font_h - 1; 513 / pm->font_h - 1;
514 pm->keyboard_margin = sc->getheight() - BUTTONBAR_HEIGHT - 514 pm->keyboard_margin = sc_h - BUTTONBAR_HEIGHT - statusbar_size
515 statusbar_size - (pm->lines+1)*pm->font_h; 515 - (pm->lines+1)*pm->font_h;
516 516
517 if (pm->keyboard_margin < 3) 517 if (pm->keyboard_margin < 3)
518 { 518 {
@@ -537,7 +537,7 @@ int kbd_input(char* text, int buflen)
537#ifdef KBD_MORSE_INPUT 537#ifdef KBD_MORSE_INPUT
538 pm->old_main_y = pm->main_y; 538 pm->old_main_y = pm->main_y;
539 if (morse_mode) 539 if (morse_mode)
540 pm->main_y = sc->getheight() - pm->font_h; 540 pm->main_y = sc_h - pm->font_h;
541#endif 541#endif
542 } 542 }
543 543
@@ -729,8 +729,7 @@ int kbd_input(char* text, int buflen)
729 sc->vline(i, pm->main_y, pm->main_y + pm->font_h - 1); 729 sc->vline(i, pm->main_y, pm->main_y + pm->font_h - 1);
730 730
731 if (pm->hangul) /* draw underbar */ 731 if (pm->hangul) /* draw underbar */
732 sc->hline(pm->curpos*text_w, (pm->curpos+1)*text_w, 732 sc->hline(i - text_w, i, pm->main_y + pm->font_h - 1);
733 pm->main_y + pm->font_h - 1);
734 } 733 }
735 734
736 cur_blink = !cur_blink; 735 cur_blink = !cur_blink;