Support and General Use > Theming and Appearance Customization
Any possibility for conditional %Cl?
RetiredTeacherGuy:
I would find it really beneficial to be able to call different artwork sizes within the WPS using a conditional. Any chance?
Bilgus:
looks like %Cl already has some options
--- Quote ---%Cl(xpos,ypos,maxwidth,maxheight,[horizontal alignment],[vertical alignment])
--- End quote ---
i assume max width/height only serve to resize after load?
I guess the question is what do you envision it doing?
like an extra index that lets you select or specifying a size?
and how does it get along with the current themes
can't go breaking stuff
RetiredTeacherGuy:
--- Quote from: Bilgus on February 03, 2025, 10:15:01 AM --- looks like %Cl already has some options
--- Quote ---%Cl(xpos,ypos,maxwidth,maxheight,[horizontal alignment],[vertical alignment])
--- End quote ---
i assume max width/height only serve to resize after load?
I guess the question is what do you envision it doing?
like an extra index that lets you select or specifying a size?
and how does it get along with the current themes
can't go breaking stuff
--- End quote ---
Unless I’m mistaken, options like max width/height set the size of the artwork once no matter where %Cd is used in the WPS? If I’m wrong then I haven’t found the right way. That would certainly solve my issue.
What I’m envisioning is a smaller artwork size when %mp is in pause. Any efforts I’ve made to have more than one %Cl just results in whichever %Cl statement is last…is used throughout. What I’d like to do is something like:
--- Code: --- %?mp<|%Cl(75,6,170,170)%VB%Cd%|%Cl(75,6,140,140)%VB%Cd%||>
--- End code ---
Bilgus:
there are a couple of caveats in that manual entry
namely: 'If the aspect ratio doesn’t match the configured values, the picture will be
placed according to the alignment flags.'
--- Quote ---D.21.1. How to display the album art
Once the album art files are present on your player, they can be displayed as follows.
Tag
Description
%Cl(x,y,[maxwidth], Define the settings for album art
[maxheight],
x: x coordinate
hor_align,
y: y coordinate
vert_align)
maxwidth: Maximum height
maxheight: Maximum width
hor_align: Horizontal alignment, enter as ‘l’, ‘c’ or ‘r’ for
left, centre or right. Centre is default
vert_align: Vertical alignment, enter as ‘t’, ‘c’ or ‘b’ for top,
centre or bottom. Centre is default
%Cd
Display the album art as configured.
%C
Use in a conditional to determine if an image is available.
The picture will be rescaled, preserving aspect ratio to fit the given maxwidth and
maxheight. If the aspect ratio doesn’t match the configured values, the picture will be
placed according to the alignment flags.
Examples:
1. Load albumart at position 20,40 and display it without resizing:
%Cl(20,40„)
Appendix D. Theme Tags
2. Load albumart at position 0,20 and resize it to be at most 100×100 pixels. If the
image isn’t square, align it to the bottom-right corner:
%Cl(0,20,100,100,r,b)
--- End quote ---
maybe it does work but the ratio is wrong? maybe try making one 'rb' right bottom and the other 'tl' top left
see if it changes?
I'll look into it this eve
RetiredTeacherGuy:
--- Quote from: Bilgus on February 03, 2025, 11:34:57 AM ---there are a couple of caveats in that manual entry
namely: 'If the aspect ratio doesn’t match the configured values, the picture will be
placed according to the alignment flags.'
--- Quote ---D.21.1. How to display the album art
Once the album art files are present on your player, they can be displayed as follows.
Tag
Description
%Cl(x,y,[maxwidth], Define the settings for album art
[maxheight],
x: x coordinate
hor_align,
y: y coordinate
vert_align)
maxwidth: Maximum height
maxheight: Maximum width
hor_align: Horizontal alignment, enter as ‘l’, ‘c’ or ‘r’ for
left, centre or right. Centre is default
vert_align: Vertical alignment, enter as ‘t’, ‘c’ or ‘b’ for top,
centre or bottom. Centre is default
%Cd
Display the album art as configured.
%C
Use in a conditional to determine if an image is available.
The picture will be rescaled, preserving aspect ratio to fit the given maxwidth and
maxheight. If the aspect ratio doesn’t match the configured values, the picture will be
placed according to the alignment flags.
Examples:
1. Load albumart at position 20,40 and display it without resizing:
%Cl(20,40„)
Appendix D. Theme Tags
2. Load albumart at position 0,20 and resize it to be at most 100×100 pixels. If the
image isn’t square, align it to the bottom-right corner:
%Cl(0,20,100,100,r,b)
--- End quote ---
maybe it does work but the ratio is wrong? maybe try making one 'rb' right bottom and the other 'tl' top left
see if it changes?
I'll look into it this eve
--- End quote ---
Assuming all artwork (for purposes of this discussion) are over 200 x 200 px, the alignment won’t matter, whether left/top, right/bottom, all will be resized and centered properly as long as I’m calling for max height and width less than 200. What I’m specifically asking about is the max height/width. In this example:
--- Code: --- %?mp<|%Cl(75,6,170,170)%VB%Cd%|%Cl(75,6,140,140)%VB%Cd%||>
--- End code ---
[/size][size=78%]The artwork will be presented as 140 x 140 in both play and pause. And in this example:[/size]
[/size]
--- Code: --- %?mp<|%Cl(75,6,140,140)%VB%Cd%|%Cl(75,6,170,170)%VB%Cd%||>
--- End code ---
[/size]
[/size][size=78%]The artwork will be presented as 170 x 170 in both play and pause. Whichever %Cl is last, wins regardless in my experience. My assumption is that this is because only one %Cl is “allowed” but maybe/hopefully I’m just approaching it incorrectly.[/size]
Navigation
[0] Message Index
[#] Next page
Go to full version