summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r--apps/gui/skin_engine/skin_display.c70
1 files changed, 29 insertions, 41 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 4c96782280..91e8bbfafc 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -135,8 +135,6 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
135 unsigned long length, end; 135 unsigned long length, end;
136 int flags = HORIZONTAL; 136 int flags = HORIZONTAL;
137 137
138 int drawn_length, drawn_end;
139
140 if (height < 0) 138 if (height < 0)
141 height = font_get(vp->font)->height; 139 height = font_get(vp->font)->height;
142 140
@@ -180,17 +178,6 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
180 end = 0; 178 end = 0;
181 } 179 }
182 180
183 if (pb->nofill)
184 {
185 drawn_length = 1;
186 drawn_end = 0;
187 }
188 else
189 {
190 drawn_length = length;
191 drawn_end = end;
192 }
193
194 if (!pb->horizontal) 181 if (!pb->horizontal)
195 { 182 {
196 /* we want to fill upwards which is technically inverted. */ 183 /* we want to fill upwards which is technically inverted. */
@@ -202,37 +189,19 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
202 flags ^= INVERTFILL; 189 flags ^= INVERTFILL;
203 } 190 }
204 191
205 192 if (pb->nofill)
193 {
194 flags |= INNER_NOFILL;
195 }
196
206 if (pb->have_bitmap_pb) 197 if (pb->have_bitmap_pb)
207 gui_bitmap_scrollbar_draw(display, &pb->bm, 198 gui_bitmap_scrollbar_draw(display, &pb->bm,
208 pb->x, y, pb->width, pb->bm.height, 199 pb->x, y, pb->width, pb->bm.height,
209 drawn_length, 0, drawn_end, flags); 200 length, 0, end, flags);
210 else 201 else
211 gui_scrollbar_draw(display, pb->x, y, pb->width, height, 202 gui_scrollbar_draw(display, pb->x, y, pb->width, height,
212 drawn_length, 0, drawn_end, flags); 203 length, 0, end, flags);
213
214 if (pb->type == SKIN_TOKEN_PROGRESSBAR)
215 {
216 if (id3 && id3->length)
217 {
218#ifdef AB_REPEAT_ENABLE
219 if (ab_repeat_mode_enabled())
220 ab_draw_markers(display, id3->length,
221 pb->x, y, pb->width, height);
222#endif
223 204
224 if (id3->cuesheet)
225 cue_draw_markers(display, id3->cuesheet, id3->length,
226 pb->x, y+1, pb->width, height-2);
227 }
228#if 0 /* disable for now CONFIG_TUNER */
229 else if (in_radio_screen() || (get_radio_status() != FMRADIO_OFF))
230 {
231 presets_draw_markers(display, pb->x, y, pb->width, height);
232 }
233#endif
234 }
235
236 if (pb->slider) 205 if (pb->slider)
237 { 206 {
238 int x = pb->x, y = pb->y; 207 int x = pb->x, y = pb->y;
@@ -267,6 +236,28 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
267 } 236 }
268#endif 237#endif
269 } 238 }
239
240 if (pb->type == SKIN_TOKEN_PROGRESSBAR)
241 {
242 if (id3 && id3->length)
243 {
244#ifdef AB_REPEAT_ENABLE
245 if (ab_repeat_mode_enabled())
246 ab_draw_markers(display, id3->length,
247 pb->x, y, pb->width, height);
248#endif
249
250 if (id3->cuesheet)
251 cue_draw_markers(display, id3->cuesheet, id3->length,
252 pb->x, y+1, pb->width, height-2);
253 }
254#if 0 /* disable for now CONFIG_TUNER */
255 else if (in_radio_screen() || (get_radio_status() != FMRADIO_OFF))
256 {
257 presets_draw_markers(display, pb->x, y, pb->width, height);
258 }
259#endif
260 }
270} 261}
271 262
272/* clears the area where the image was shown */ 263/* clears the area where the image was shown */
@@ -783,6 +774,3 @@ int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout)
783 } 774 }
784 return button; 775 return button;
785} 776}
786
787
788