diff options
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 68cb01470c..341056ff87 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -540,6 +540,7 @@ static int parse_progressbar_tag(struct skin_element* element, | |||
540 | struct skin_token_list *item; | 540 | struct skin_token_list *item; |
541 | struct viewport *vp = &curr_vp->vp; | 541 | struct viewport *vp = &curr_vp->vp; |
542 | struct skin_tag_parameter *param = element->params; | 542 | struct skin_tag_parameter *param = element->params; |
543 | int curr_param = 0; | ||
543 | 544 | ||
544 | if (element->params_count == 0 && | 545 | if (element->params_count == 0 && |
545 | element->tag->type != SKIN_TOKEN_PROGRESSBAR) | 546 | element->tag->type != SKIN_TOKEN_PROGRESSBAR) |
@@ -554,6 +555,7 @@ static int parse_progressbar_tag(struct skin_element* element, | |||
554 | pb->have_bitmap_pb = false; | 555 | pb->have_bitmap_pb = false; |
555 | pb->bm.data = NULL; /* no bitmap specified */ | 556 | pb->bm.data = NULL; /* no bitmap specified */ |
556 | pb->follow_lang_direction = follow_lang_direction > 0; | 557 | pb->follow_lang_direction = follow_lang_direction > 0; |
558 | pb->invert_fill_direction = false; | ||
557 | 559 | ||
558 | if (element->params_count == 0) | 560 | if (element->params_count == 0) |
559 | { | 561 | { |
@@ -614,6 +616,41 @@ static int parse_progressbar_tag(struct skin_element* element, | |||
614 | if (!isdefault(param)) | 616 | if (!isdefault(param)) |
615 | pb->bm.data = param->data.text; | 617 | pb->bm.data = param->data.text; |
616 | 618 | ||
619 | curr_param = 5; | ||
620 | pb->invert_fill_direction = false; | ||
621 | pb->nofill = false; | ||
622 | pb->slider = NULL; | ||
623 | pb->horizontal = pb->width > pb->height; | ||
624 | while (curr_param < element->params_count) | ||
625 | { | ||
626 | param++; | ||
627 | if (!strcmp(param->data.text, "invert")) | ||
628 | pb->invert_fill_direction = true; | ||
629 | else if (!strcmp(param->data.text, "nofill")) | ||
630 | pb->nofill = true; | ||
631 | else if (!strcmp(param->data.text, "slider")) | ||
632 | { | ||
633 | if (curr_param+1 < element->params_count) | ||
634 | { | ||
635 | curr_param++; | ||
636 | param++; | ||
637 | pb->slider = find_image(param->data.text, wps_data); | ||
638 | if (!pb->slider) | ||
639 | return -1; | ||
640 | } | ||
641 | } | ||
642 | else if (!strcmp(param->data.text, "vertical")) | ||
643 | { | ||
644 | pb->horizontal = false; | ||
645 | if (isdefault(&element->params[3])) | ||
646 | pb->height = vp->height - pb->x; | ||
647 | } | ||
648 | else if (!strcmp(param->data.text, "horizontal")) | ||
649 | pb->horizontal = true; | ||
650 | |||
651 | curr_param++; | ||
652 | } | ||
653 | |||
617 | 654 | ||
618 | if (token->type == SKIN_TOKEN_VOLUME) | 655 | if (token->type == SKIN_TOKEN_VOLUME) |
619 | token->type = SKIN_TOKEN_VOLUMEBAR; | 656 | token->type = SKIN_TOKEN_VOLUMEBAR; |