Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Outlining parts of the groupingtitle to the right (Read 2112 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Outlining parts of the groupingtitle to the right

Dunno if this is possible or not, but i didn't find a way for it. Would be nice to see album artist date and album on the left side of the grouptitle, and genre on the right. tried several stuff, but can't get it to work nice against the rightedge of my screen. In default ui.

It has to take in account the charlength of genre and the "artist - [date] album" charlength. (done with $len or $len2)
In between there can be whatever char, preferrably - or something. (done with $tab or $tab_right)

It should show like this ( | is playlist edge, e.g. a splitter or vert. scrollbar)

| album artist 1234 - [%date%] album 1234 ------------------------------------------------------------------------- genre |
or if multivalue:
| album artist 123456 - [%date%] album 123456 ---------------------------------------------------------- genre,genre |

Tried some stuff with $add and $min for calculating how much '----' I need for making genre always ends at for example 150'th position of all characters. Trying for too long now I give up. I know it has to be possible, seen my results so far, but I can't get it to work nicely outlined... Please help.

I have this so far, almost working... what is going wrong?
Code: [Select]
%album artist% - '['[%date%]']' %album% $pad_right(%genre%,$add($len2(%album artist%),$len2(%date%),$len2(%album%),4,$len2(%genre%),$sub(150,$add($len2(%album artist%),$len2(%date%),$len2(%album%),4,$len2(%genre%)))),-)


Could it be a truetype issue? (nope, tested with courier, courier isn't truetype...)

Outlining parts of the groupingtitle to the right

Reply #1
That technique will only work with a fixed width font, most fonts having variable width characters. Your formatting strings make the implicit assumption that the width of each character is the same as the width of the "-" character.

 

Outlining parts of the groupingtitle to the right

Reply #2
I know what you mean, so I used a fixed font, like Bitstream (courier also is). But still doesn't work. Don't think this is possible.

formula is correct i think?
the amount of characters needed to fill the space between right and left aligned words is a fixed number minus the amount of letters in all words used.
(if all characters were of the same length)

I give up.