Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

touchscreen: Allow bar tag touchregions to be labeled

This is necessary if you want to detect touches on the bar region
using %Tl conditionals. Suppressing the auto-created region and then
creating one manually using %T doesn't give exactly the same results
because user-defined touch regions can't yet specify padding.

Change-Id: I2f4bde8eb56ba89645c72f3cc9d4b2355b934abd

+14 -1
+13 -1
apps/gui/skin_engine/skin_parser.c
··· 982 982 char *image_filename = NULL; 983 983 #ifdef HAVE_TOUCHSCREEN 984 984 bool suppress_touchregion = false; 985 + char *touchregion_label = NULL; 985 986 #endif 986 987 987 988 if (element->params_count == 0 && ··· 1156 1157 #ifdef HAVE_TOUCHSCREEN 1157 1158 else if (pb_op == eNOTOUCH) 1158 1159 suppress_touchregion = true; 1160 + else if (!strcmp(text, "touchlabel")) 1161 + { 1162 + if (curr_param+1 < element->params_count) 1163 + { 1164 + curr_param++; 1165 + param++; 1166 + touchregion_label = SKINOFFSETTOPTR(skin_buffer, param->data.text); 1167 + } 1168 + else /* option needs the next param */ 1169 + return -1; 1170 + } 1159 1171 #endif 1160 1172 else if (token->type == SKIN_TOKEN_SETTING && pb_op == eSETTING_OFFSET) 1161 1173 { ··· 1285 1297 region->press_length = PRESS; 1286 1298 region->last_press = -1; 1287 1299 region->bar = PTRTOSKINOFFSET(skin_buffer, pb); 1288 - region->label = PTRTOSKINOFFSET(skin_buffer, NULL); 1300 + region->label = PTRTOSKINOFFSET(skin_buffer, touchregion_label); 1289 1301 1290 1302 item = new_skin_token_list_item(NULL, region); 1291 1303 if (!item)
+1
manual/appendix/wps_tags.tex
··· 758 758 ``slider'' option). 759 759 \opt{touchscreen}{ 760 760 \item[notouch] -- don't create the touchregion for progress/volume bars. 761 + \item[touchlabel] -- the next option sets the label of the bar touch area, for linking with the \%Tl tag. 761 762 } 762 763 \item[soffset] -- For compound settings (such as the equalizer), this lets you pick which element in the set to use. The next param must be the number. Must be specified prior to the setting name. 763 764 \item[setting] -- Specify the setting name to draw the bar from (bar must be