summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_display.c
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2010-03-07 12:51:23 +0000
committerTeruaki Kawashima <teru@rockbox.org>2010-03-07 12:51:23 +0000
commitf50885534ec6fa78c2c89e275c5ffd592be5cd2e (patch)
treeb60a7d0f7a1c5124cddedeac585c0bb1c1a11d4f /apps/gui/skin_engine/skin_display.c
parent1e9789879ff620c78b594801bf37abc256bdcc2b (diff)
downloadrockbox-f50885534ec6fa78c2c89e275c5ffd592be5cd2e.tar.gz
rockbox-f50885534ec6fa78c2c89e275c5ffd592be5cd2e.zip
Pass width instead of x+width to ab_draw_markers()/cue_draw_markers() and don't recalculate the width in these functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25053 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r--apps/gui/skin_engine/skin_display.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 97f9ee3748..845ea18608 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -124,14 +124,14 @@ static void draw_progressbar(struct gui_wps *gwps,
124 int y = pb->y, height = pb->height; 124 int y = pb->y, height = pb->height;
125 unsigned long length, elapsed; 125 unsigned long length, elapsed;
126 126
127 if (pb->height < 0 && !pb->have_bitmap_pb) 127 if (height < 0)
128 height = font_get(wps_vp->vp.font)->height; 128 height = font_get(wps_vp->vp.font)->height;
129 129
130 if (y < 0) 130 if (y < 0)
131 { 131 {
132 int line_height = font_get(wps_vp->vp.font)->height; 132 int line_height = font_get(wps_vp->vp.font)->height;
133 /* center the pb in the line, but only if the line is higher than the pb */ 133 /* center the pb in the line, but only if the line is higher than the pb */
134 int center = (line_height-pb->height)/2; 134 int center = (line_height-height)/2;
135 /* if Y was not set calculate by font height,Y is -line_number-1 */ 135 /* if Y was not set calculate by font height,Y is -line_number-1 */
136 y = (-y -1)*line_height + (0 > center ? 0 : center); 136 y = (-y -1)*line_height + (0 > center ? 0 : center);
137 } 137 }
@@ -160,12 +160,12 @@ static void draw_progressbar(struct gui_wps *gwps,
160#ifdef AB_REPEAT_ENABLE 160#ifdef AB_REPEAT_ENABLE
161 if (ab_repeat_mode_enabled()) 161 if (ab_repeat_mode_enabled())
162 ab_draw_markers(display, id3->length, 162 ab_draw_markers(display, id3->length,
163 pb->x, pb->x + pb->width, y, height); 163 pb->x, y, pb->width, height);
164#endif 164#endif
165 165
166 if (id3->cuesheet) 166 if (id3->cuesheet)
167 cue_draw_markers(display, id3->cuesheet, id3->length, 167 cue_draw_markers(display, id3->cuesheet, id3->length,
168 pb->x, pb->x + pb->width, y+1, height-2); 168 pb->x, y+1, pb->width, height-2);
169 } 169 }
170} 170}
171 171