Support and General Use > Theming and Appearance Customization

Language aware positioning of WPS elements

(1/2) > >>

tomers:
This is not actually a bug, nor a patch
I would like to have a conditional positioning of an album-art, depending on the #?Sr token. How can I achieve this?

I tried to create a viewport according to two different criteria - whether or not an album-art exist (%?C) and language direction (%?Sr).
Any ideas?

Attached is a work in progress WPS for Cowon-D2, which I try to change into language direction sensitive WPS screen.

tomers:
Attaches are screenshots of the expected result (manually made for Cowon D2)

pixelma:
You should be able to get this effect with conditional viewports by working with two sets of an album art viewport and a text viewport - both the same size but at different positions.


* Preload album art (position is relative to the viewport it is displayed in hence the same for the 2 sets)
* Define two sets of conditional viewports (say "a" for left to right and "b" for right to left) - the album art viewport and the corresponding text one of each set can have the same identifier. And I guess "a" already exists and there will be one for the album art not present case which is probably centre aligned (lets call it "c").
* Let it display set a, b or c depending on presence of album art and the %?Sr tag.
I'm not sure how %?Sr is used exactly, assuming it's %?Sr<it's a right to left language|not a right to left language> and with the above example, the most important line should look similar to this:
--- Code: ---%?C<%?Sr<%Vdb|%Vda>|%Vdc>
--- End code ---

P.S.: Just a wish - if you change it for cabbiev2 in SVN, please try to change all versions for targets that use album art (colour and greyscale displays).

Edit:
I just saw your attached .wps file. It looks like there is only one viewport for album art and text (and every case). I would put the album art in an own viewport and the text in a seperate one - the text would be printed across the art and would be displayed in your album art viewport currently if I read things correctly. Then the %Cl can (or should be) before the %Vl tags because it will then be used in the same way, relative to the borders in the two album art viewports which contain the %C. The check for which viewport should be displayed looks correctly I think (with the extra of having left and right aligned versions of the display when there is no album art).

tomers:
I've just posted a more elegant solution for this problem:
FS#10882 - RTL aware WPS

pixelma: I would greatly appreciate if you can review and comment about this patch.

[Saint]:
tomers,


Just an opinion, but why not make your own WPS (even if it is just another cabbie variant) as well as the patch?

The theme site isn't as "dangerously underpopulated" as it used to be (depending on the target)...but it could still (and always) use more content. Fresh content with new or interesting uses of code can inspire new authors to make newer/better content.

A great many number of people can access this patch, apply it to their liking, compile a build etc.....but a great many more (potentially) could benefit from the same piece of code when presented as a WPS and uploaded to the Theme Site.

And then, you get to express yourself artistically as well  ;D


Just a thought,
[St.]

Navigation

[0] Message Index

[#] Next page

Go to full version