forked from len0rd/rockbox
skin_engine: New param "noborder" for the bar tags.
By specifying this param the bar will not have a border/box. Instead the inner part that fills up is maximized on the bar area. Note that this only affects bars using foreground and background colors, not those constructed with images. Change-Id: Ib8dd49ecbaf9e16b96de840f5f365871b73d4fa4
This commit is contained in:
parent
6e882b43b6
commit
3ae73433ab
5 changed files with 38 additions and 12 deletions
|
|
@ -901,6 +901,7 @@ static int parse_progressbar_tag(struct skin_element* element,
|
|||
pb->vp = PTRTOSKINOFFSET(skin_buffer, vp);
|
||||
pb->follow_lang_direction = follow_lang_direction > 0;
|
||||
pb->nofill = false;
|
||||
pb->noborder = false;
|
||||
pb->nobar = false;
|
||||
pb->image = PTRTOSKINOFFSET(skin_buffer, NULL);
|
||||
pb->slider = PTRTOSKINOFFSET(skin_buffer, NULL);
|
||||
|
|
@ -978,6 +979,8 @@ static int parse_progressbar_tag(struct skin_element* element,
|
|||
pb->invert_fill_direction = true;
|
||||
else if (!strcmp(text, "nofill"))
|
||||
pb->nofill = true;
|
||||
else if (!strcmp(text, "noborder"))
|
||||
pb->noborder = true;
|
||||
else if (!strcmp(text, "nobar"))
|
||||
pb->nobar = true;
|
||||
else if (!strcmp(text, "slider"))
|
||||
|
|
@ -1051,6 +1054,11 @@ static int parse_progressbar_tag(struct skin_element* element,
|
|||
|
||||
if (image_filename)
|
||||
{
|
||||
/* noborder is incompatible together with image. There is no border
|
||||
* anyway. */
|
||||
if (pb->noborder)
|
||||
return WPS_ERROR_INVALID_PARAM;
|
||||
|
||||
pb->image = PTRTOSKINOFFSET(skin_buffer,
|
||||
skin_find_item(image_filename, SKIN_FIND_IMAGE, wps_data));
|
||||
if (!SKINOFFSETTOPTR(skin_buffer, pb->image)) /* load later */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue