summaryrefslogtreecommitdiff
path: root/apps/gui/buttonbar.c
diff options
context:
space:
mode:
authorMarcoen Hirschberg <marcoen@gmail.com>2005-12-06 13:27:15 +0000
committerMarcoen Hirschberg <marcoen@gmail.com>2005-12-06 13:27:15 +0000
commitb0fee17d6e1a463dcd84568e5997663b69488998 (patch)
treefffce775c4d1636a8bbc9e97669aa99b9378fc15 /apps/gui/buttonbar.c
parent01917ec9809f1abff87cb372b700fc09476d343e (diff)
waiting is over: initial unicode commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8169 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/buttonbar.c')
-rw-r--r--apps/gui/buttonbar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gui/buttonbar.c b/apps/gui/buttonbar.c
index 0917c511ba..b0c374d41f 100644
--- a/apps/gui/buttonbar.c
+++ b/apps/gui/buttonbar.c
@@ -47,9 +47,9 @@ void gui_buttonbar_set_display(struct gui_buttonbar * buttonbar,
void gui_buttonbar_draw_button(struct gui_buttonbar * buttonbar, int num)
{
int xpos, ypos, button_width, text_width;
- int fw, fh;
+ int fh;
struct screen * display = buttonbar->display;
- display->getstringsize("M", &fw, &fh);
+ display->getstringsize("M", NULL, &fh);
button_width = display->width/BUTTONBAR_MAX_BUTTONS;
xpos = num * button_width;
@@ -58,7 +58,7 @@ void gui_buttonbar_draw_button(struct gui_buttonbar * buttonbar, int num)
if(buttonbar->caption[num][0] != 0)
{
/* center the text */
- text_width = fw * strlen(buttonbar->caption[num]);
+ text_width = display->getstringsize(buttonbar->caption[num], NULL, NULL);
display->putsxy(xpos + (button_width - text_width)/2,
ypos, buttonbar->caption[num]);
}