INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5   Go Down

Author Topic: Custom Tooltips/TheaterView Screens  (Read 26470 times)

Mans

  • Galactic Citizen
  • ****
  • Posts: 418
Re: Custom Tooltips/TheaterView Screens
« Reply #150 on: December 04, 2023, 01:48:29 pm »

Many thanks dear Zybex,

Thanks Lepa for the initial work done :-)
Much appreciated, getting closer with Zybex help here :-)

Something I've just noticing which was also causing a problem,
When album titles using ":" or "_", the art isn't shown only the jpg number and the height and width requirements.
Since they did show up as normal cover art, only not within the list of alternative albums i couldn't find the clue.
Anyway I noticed it now and find&replace correct it all at once :-)

One thing is off; The count of alternative albums is one too high, actually two.
Showing the exact number of alternative albums in total +1.
This instead of -1 as one is already displayed/selected.
Now it comes back as p.e. 10 albums as alternative, where only 9 albums exists, but since one is already selected it should say 8 alternative numbers.
Guessing the counting code is somewhere doing +1 instead of -1,

Much appreciated for your help and wishing you a great day,

Mans.

Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #151 on: December 04, 2023, 02:14:18 pm »

There's no math there, it's just counting the different names. It's more likely there are duplicate/similar names in the list that don't have a corresponding image in the folder. This will print the album names together with the poster (if there's a poster):

Code: [Select]
save(listsort(listclean(listclean(listclean(replace(;Load(vAlbumsByArtist[Album Artist (auto)]);, [Album];,,1), 1), 3), 4)), _albums)/
listmix(/#save(replace([_albums], [L1], _), _albums)#/, 0, :;\;//;?;*;>;<;";|)/
<font size="80" color="#9496a3">ifcase(ListCount([_albums]), 6, 2, ListCount([_albums]) other albums by, 1, 1 other album by, 0, No other albums by) [Album Artist (auto)]/
if([_albums], :
replace(listmix(/#[N]: "[L1]"
<img src="C:\JRiver Cover Art\Albums\[Album Artist (auto)] - [L1].jpg" width="45" height="45">#/, 0, [_albums]),;,char(13)),)<//font>

It also replaces all forbidden chars in the Album name with an underscore - the Album poster filename should follow the same convention.
Logged

Mans

  • Galactic Citizen
  • ****
  • Posts: 418
Re: Custom Tooltips/TheaterView Screens
« Reply #152 on: December 04, 2023, 02:51:08 pm »

Thanks Zybex,

Very helpfull :-)
The chars are now all cleaned up, thanks.

Only the number of alternative albums is still one to high.
As you mentioned it displays the number of all albums per artist.
But since this code is used to sum all "alternative" albums to this artist, it should mention -1.

And the print command shows them all, eachtime one too much as it includes the already selected one.

Thanks again Zybex, appreciated !
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #153 on: December 04, 2023, 03:14:17 pm »

The code already removes the current Album from the list, so it should not count or show it.
I modified the code again to print the album list it's seeing. Please try it and paste a screenshot of the names.

Code: [Select]
save(listsort(listclean(listclean(listclean(replace(;Load(vAlbumsByArtist[Album Artist (auto)]);, [Album];,,1), 1), 3), 4)), _albums)/
listmix(/#save(replace([_albums], [L1], _), _albums)#/, 0, :;\;//;?;*;>;<;";|)/
<font size="80" color="#9496a3">ifcase(ListCount([_albums]), 6, 2, ListCount([_albums]) other albums by, 1, 1 other album by, 0, No other albums by) [Album Artist (auto)]/
if([_albums], :

current album:
"[Album]"
Other albums:
replace(listmix(/#"[L1]"#/, 0, [_albums]),;,char(13)),)

replace(listmix(/#[N]: "[L1]"
<img src="C:\JRiver Cover Art\Albums\[Album Artist (auto)] - [L1].jpg" width="45" height="45">#/, 0, [_albums]),;,char(13)),)<//font>
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #154 on: December 04, 2023, 03:31:52 pm »

The problem could be caused by extra spaces in the list items. Here's a version that ignores spaces:

Code: [Select]
save(listsort(listclean(listclean(replace(;listclean(trim(Load(vAlbumsByArtist[Album Artist (auto)])), 1);,;trim([Album]);,;,1), 3), 4)), _albums)/
listmix(/#save(replace([_albums], [L1], _), _albums)#/, 0, :;\;//;?;*;>;<;";|)/
<font size="80" color="#9496a3">ifcase(ListCount([_albums]), 6, 2, ListCount([_albums]) other albums by, 1, 1 other album by, 0, No other albums by) [Album Artist (auto)]/
if([_albums], :
replace(listmix(/#<img src="C:\JRiver Cover Art\Albums\[Album Artist (auto)] - [L1].jpg" width="45" height="45">#/, 0, [_albums]),;,/ / ),)<//font>
Logged

Mans

  • Galactic Citizen
  • ****
  • Posts: 418
Re: Custom Tooltips/TheaterView Screens
« Reply #155 on: December 07, 2023, 11:16:40 am »

Much appreciated Zybex,

Cool, all album art is now into place and displayed as should :-)

The only remaining thing, the title informing about the number of alternative albums is still one to high;
It mentions the exact number of albums per selected artist, without the minus 1 due to one already selected/displayed.
I'll give this one myself a go during the weekend, maybe I'll figure it out this time :-)

Thanks again for the nice help, have a great day,

Mans.
Logged

Mans

  • Galactic Citizen
  • ****
  • Posts: 418
Re: Custom Tooltips/TheaterView Screens
« Reply #156 on: December 09, 2023, 08:25:32 am »

Another thanks for your kind help Zybex and Lepa,

I was also able to correct the albumcount, in order to substract the already shown album :-)
Now the number of 'alternative albums' is displayed correctly,
Was much more simple as I tought initially :-)
Code: [Select]
save(listsort(listclean(listclean(replace(;listclean(trim(Load(vAlbumsByArtist[Album Artist (auto)])), 1);,;trim([Album]);,;,1), 3), 4)), _albums)/
listmix(/#save(replace([_albums], [L1], _), _albums)#/, 0, :;\;//;?;*;>;<;";|)/
<font size="80" color="#9496a3">ifcase(Math(ListCount([_albums])-1), 6, 2, Math(ListCount([_albums])-1) other albums by, 1, 1 other album by, 0, No other albums by) [Album Artist (auto)]/
if([_albums], :
replace(listmix(/#<img src="C:\JRiver Cover Art\Albums\[Album Artist (auto)] - [L1].jpg" width="45" height="45">#/, 0, [_albums]),;,/ / ),)<//font>
Logged

Mans

  • Galactic Citizen
  • ****
  • Posts: 418
Re: Custom Tooltips/TheaterView Screens
« Reply #157 on: December 10, 2023, 06:37:30 am »

Hi Zybex,
One more request :-)

Code: [Select]
if([_albums],
replace(listmix(/#<img src="C:\JRiver Cover Art\Albums\[Album Artist (auto)] - [L1].jpg" width="45" height="45">#/, 0, [_albums]),;,/ / ),)<//font>

With the following code, I'm noticing, when having more as 8 alternative albums, the spacing isn't always well.
Due to max space for 8 covert art's per line, the 9th album then jumps to the next line and causing a not-so-clean alignment vs the previous line.

Could the replace(Listmix) also be limited to pe 8 results per line ?
Should I enter multiple parts of code per line ? 1-8 and 9-17, etc

Thanks again :-)
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #158 on: December 10, 2023, 12:23:07 pm »

Try this to break in groups of 8 (up to 80 results supported, just change the '10' in the repeat() function if you need more):

Code: [Select]
if([_albums], :
replace(listmix(/#<img src="C:\JRiver Cover Art\Albums\[Album Artist (auto)] - [L1].jpg" width="45" height="45">if([L2],char(10),/ / )#/, 2, [_albums],repeat(;;;;;;;1,10)),;,),)<//font>

Or, you can just remove the spacing between the images:
Code: [Select]
if([_albums],
replace(listmix(/#<img src="C:\JRiver Cover Art\Albums\[Album Artist (auto)] - [L1].jpg" width="45" height="45">#/, 0, [_albums]),;,),)<//font>

Quote
I was also able to correct the albumcount, in order to substract the already shown album :-)
cool :) But really, this should not be needed with this code. I asked you for a screenshot to see why it was not working - likely the other code that populates the vAlbumsByArtist variable is doing something unexpected. Anyway, no need to worry if you got it working.
Logged

Mans

  • Galactic Citizen
  • ****
  • Posts: 418
Re: Custom Tooltips/TheaterView Screens
« Reply #159 on: December 10, 2023, 03:19:50 pm »

Many thanks Zybex !
Perfect, job completed :-)

Attached a screenshot with the printed cover art and the album count above it.
Sorry I've missed the request to post a screenshot.

FYI I've got 3 albums into the Arcade Fire folder, MC has them shown correctly.
Once I select one of them, the number of 2 alternative albums should be mentioned, here's 3 (the total albums).

With the Math adaption the count is corrected.

Thanks again for the kind help !

Mans.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #160 on: December 10, 2023, 04:31:28 pm »

"ArcadeFireID" - this is the extra item in the list, likely added by the expression you have somewhere else that sets the vAlbumsByArtist variable.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #161 on: December 14, 2023, 01:05:03 pm »

I am trying to recreate this expression to my needs and I have encounted an error on my expression. I can't figure out where is the error.
Code: [Select]
Replace(ListMix(If(IsMissing(C:\Jiver\Artwork\artists\[L1].jpg),,<img src="C:\Jiver\Artwork\artists\[L1].jpg" size="115x115">),1,[amg artist similar],1;2;3;4;5),;,)
Replace(ListClean(ListMix(If(IsMissing(C:\Jiver\Artwork\artists\[L1].jpg),,<font face="courier" size="92">If(Compare(Length([L1],>,23)),Mid([L1],0,20).../ / ,[L1]Repeat(/ ,Math(25-Length([L1]))))<//font>),1,[amg artist similar],1,2,3,4,5),3),;,)
It show my image file but when comes to text it is an syntax error.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #162 on: December 14, 2023, 01:09:57 pm »

C:\Jiver ?
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #163 on: December 14, 2023, 01:13:51 pm »

No, that is my location name.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #164 on: December 14, 2023, 01:16:15 pm »

Your second Listmix has "1,2,3,4,5" instead of "1;2;3;4;5" :)
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #165 on: December 14, 2023, 01:20:34 pm »

That is change from , to ;. But the syntax is still there. Now is x5 times.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #166 on: December 14, 2023, 01:22:29 pm »

You have a misplaced parenthesis in Length(). Fixed here:

Code: [Select]
Replace(ListClean(ListMix(If(IsMissing(C:\Jiver\Artwork\artists\[L1].jpg),,<font face="courier" size="92">If(Compare(Length([L1]),>,23),Mid([L1],0,20).../ / ,[L1]Repeat(/ ,Math(25-Length([L1]))))<//font>),1,[amg artist similar],1;2;3;4;5),3),;,)
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #167 on: December 14, 2023, 01:23:29 pm »

I think the error is somewhere on this part of expression

I will try to breakdown every part of this expression to see where lies that error.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #168 on: December 14, 2023, 03:18:41 pm »

Did you see the fix in the post above?
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #169 on: December 14, 2023, 04:01:34 pm »

Yes. I have seen the issue... Thx
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #170 on: December 15, 2023, 05:05:34 pm »

If you like you could make it a little more clever by:
1. checking all similar artists at one go
2. shuffling the returned list of available artists (so it is not always the first five if there are more hits)
3. limiting to 5 artists and use that list (v_similar) to render images and names.

Code: [Select]
Save(E:\.MC Images\Music\Artists\Square,v_image path)/

Save(ListLimit(ListShuffle(ListClean(ListMix(If(IsMissing([v_image path]\Clean([L1],3).jpg),,[L1]),,[amg artist similar]),3)),5),v_similar)/

If(IsEmpty([v_similar]),,
    Replace(ListMix(<img src="[v_image path]\Clean([L1],3).jpg" size="115x115">,,[v_similar]),;,)/
    <br>/
    <font face="courier" size="92">Replace(ListMix(If(Compare(Length([L1]),>,23),Mid([L1],0,20).../ / ,[L1]Repeat(/ ,Math(25 - Length([L1])))),,[v_similar]),;,)<//font>
)
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #171 on: December 16, 2023, 10:18:07 pm »

Hey Lepa. That is a one expression or multiple ones? Im trying to figure out the meaning of it. I barely used the save function on my work.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #172 on: December 17, 2023, 03:54:06 am »

It outputs maximum of five artist images and on second row the artist names like your previous script.
You can loose the save rows and just use the saved text in the script latter. IMO It is just easier to read and construct big things using the variables when you don't have so long rows.

saves my image path to variable v_image_path. "/" in the end means that linefeed is not inserted. yet another thing to make script more readable as code can be done in multiple lines without linefeeds in the rendering
Code: [Select]
Save(E:\.MC Images\Music\Artists\Square, v_image path)/
Every artist from [amg artist similar] which has image in your saved v_image path is parsed to list, that list is shuffled and limited to 5 items and saved to v_similar. So v_similar is now dynamic field containing shuffled and limited list of artists for which you have image in your system
Code: [Select]
Save(ListLimit(ListShuffle(ListClean(ListMix(If(IsMissing([v_image path]\Clean([L1],3).jpg),,[L1]),,[amg artist similar]),3)),5),v_similar)/
Code: [Select]
If(IsEmpty([v_similar]),,    use variable v_similar to print images row
Code: [Select]
    Replace(ListMix(<img src="[v_image path]\Clean([L1],3).jpg" size="115x115">,,[v_similar]),;,)/    linefeed
Code: [Select]
    <br>/    use v_similar to print artist names
Code: [Select]
    <font face="courier" size="92">Replace(ListMix(If(Compare(Length([L1]),>,23),Mid([L1],0,20).../ / ,[L1]Repeat(/ ,Math(25 - Length([L1])))),,[v_similar]),;,)<//font>
)


Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #173 on: December 17, 2023, 05:14:39 am »

IMO It is just easier to read and construct big things using the variables when you don't have so long rows.

It's also good for performance, as you only do the v_similar calculation once and then use the result in 2 places. Without the Save you would need to run the same calculation twice, doubling the execution time.

There's no need to initialize v_similar as the value is replaced on the next line.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #174 on: December 17, 2023, 05:29:41 am »

There's no need to initialize v_similar as the value is replaced on the next line.
That's right. It was leftover from other try
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #175 on: December 17, 2023, 11:02:59 am »

Thx for the description. When I have the time I will try to replicate yours and see what happends.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #176 on: December 20, 2023, 10:37:31 am »

@Lepa
I have done those steps, but in the end I have this

I made them two fields v_image path, and v_similar. On your v_image path you have a different path so I did change with mine.
Code: [Select]
Save(C:\Jiver\Artwork\Artists\square, v_image path)/Im not sure if the square are from your path or needed to be there. My exact path for image are:
Code: [Select]
C:\Jiver\Artwork\Artists\Artist Name.jpg and then I have the file name.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #177 on: December 20, 2023, 12:55:47 pm »

Square is just my folder for square images. I have also folder for wide images.
e.g. "E:\.MC Images\Music\Artists\Square\ABBA.jpg" & "E:\.MC Images\Music\Artists\Wide\ABBA.jpg"

You don't have to save and use variable [v_image path] if you don't want. Just replace it with your path. I just find it easier to modify path when is saved out of the business logic and the actual script is also more clean and thus easier to maintain.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #178 on: December 20, 2023, 03:40:14 pm »

Quote
I made them two fields v_image path, and v_similar. On your v_image path you have a different path so I did change with mine.
Just to be clear - you must NOT create fields in MC with these names, they are temporary variables. If you did, you need to delete them.

I just noticed the line numbers in your Zelda screenshot - Zelda is giving you an error because you did not add the Save() lines, you're just testing the 3rd line of code. That won't work without the Save() calls first, you need to paste all the code there (and also in MC when you use the code there)
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #179 on: December 21, 2023, 04:07:40 pm »

I manage to do this:

The only issue now, is to adjust the text to be in the same line with image.
The initial expression had to be change to a better suitable font and the size for it.
Code: [Select]
Save(C:\Jiver\Artwork\Artists, v_image path)/
Save(ListLimit(ListShuffle(ListClean(ListMix(If(IsMissing([v_image path]\Clean([L1],3).jpg),,[L1]),,[amg artist similar]),3)),5),v_similar)/
If(IsEmpty([v_similar]),,Replace(ListMix(<img src="[v_image path]\Clean([L1],3).jpg" size="115x115">,,[v_similar]),;,)/

<br>/
<font face="sudo ui medium"size="95">/ Replace(ListMix(If(Compare(Length([L1]),>,22),Mid([L1],0,25).../ / ,[L1]Repeat(/ ,Math(25 - Length([L1])))),,[v_similar]),;,)<//font>
)))))
I will try to play with the length() and maybe to adjust properly.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Custom Tooltips/TheaterView Screens
« Reply #180 on: December 21, 2023, 04:22:40 pm »

Nice!  :)

For the spacing, just increase the two "25" numbers to add/remove spaces. You can also adjust the image sizes (115x115)
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #181 on: December 21, 2023, 04:44:56 pm »

The problem with adjusting the size it will not fit the number I want in the tooltip. I did try that and it offset to 4 or less.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #182 on: December 22, 2023, 01:05:04 am »

"sudo ui medium" probably isn't mono font. try to use plain "sudo medium" font and then play with font size and/or spacing
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #183 on: January 20, 2024, 10:57:03 am »

Just to note that alignments of the views are currently broken in MC32 due to internal hard coded font size changes. Also because of image rendering changes which removes spacing between objects (this is a good thing)
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #184 on: January 20, 2024, 11:31:29 am »

I yet not installed the new version, but that doesn't sound great. Can you share some screen shot of this?
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #185 on: January 20, 2024, 11:46:07 am »

Font is now 20% bigger. It only affects painfully (meaning re-calculating things) if one has relied on that constant when positioning items. Just need to wait till the dust settles and then try to adapt. Time will tell what kind of possibilities changes will enable.

Also you can set scaling 20% smaller and it makes font smaller but of course scaling also affects other elements
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72531
  • Where did I put my teeth?
Re: Custom Tooltips/TheaterView Screens
« Reply #186 on: January 20, 2024, 12:20:06 pm »

lepa,
Don't worry about it.  We'll make sure your work is preserved.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #187 on: January 20, 2024, 12:52:59 pm »

53. NEW: Added support for "pt" and "px" size definitions in inline string <font> parameters
I suppose this is the reason why fonts size are changes? No other thing I see in the new build. Jim can this be elaborate a bit to understand the reason you made the changes?

Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #188 on: January 20, 2024, 01:23:36 pm »

lepa,
Don't worry about it.  We'll make sure your work is preserved.
Thanks. Not worrying though, just proactive note here that adjustment is needed but it is better handled later when TheaterView changes are known and stabilized :) Looking forward
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72531
  • Where did I put my teeth?
Re: Custom Tooltips/TheaterView Screens
« Reply #189 on: February 03, 2024, 03:32:33 am »

A lot of the work from this thread has been incorporated in this new feature:

Active Theater View Templates

It involves a data change that could affect custom work done.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #190 on: February 16, 2024, 11:45:03 pm »

Did you break the "valign" on font properties with version 32? I see this is not working anymore. Checking on the older version has no problem with valign properties in fonts.
Another thing is on some of my tooltips are ok, some are not.


I have checked these two tooltip to see what is the difference and I don't see anything odd about them.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #191 on: February 17, 2024, 05:05:01 am »

Vertical align itself still works. If you mean that there is no padding then what you see is probably related to this:
"54. Changed: Empty text tokens no longer contribute vertical height when rendering text, resulting in a more consistent vertical spacing."

Change is good for me so now there is no automatic padding between the components (which is very big one if font was very big in earlier row etc) but i can add it myself by using transparent image (1x1-transparent.png) for whatever size

Code: [Select]

### Don't have all your fields so created variables for example
Save(1, v_Track Pick)/
Save(71, v_Track Popularity)/
Save(4, v_Track Ranking)/
Save(5, v_Track Rating)/
Save(06-Jan-2024, v_Track Rating Date)/
Save(1, v_Track Play Count)/
Save(6 Times, v_Track Play Counter)/
Save(23-Jan-2024, v_Track Play Date)/
Save(1, v_Track Skip Count)/
Save(1 Time, v_Track Skip Counter)/
Save(28-Aug-2023, v_Track Skip Date)/
Save(69512481, v_Track Play Score)/



Save(20, v_LabelMaxLen)/
Save(20, v_ValueMaxLen)/
Save(color="#111111", v_FontColor)/
Save(bgcolor="#CECDEB", v_FontLabelBGColor)/
Save(bgcolor="#FFAED7", v_FontValueBGColor)/
Save(color="#17B4FF", v_FontColumnTitle)
Save(<img src="tooltip:MISC//Separator//1x1-transparent" size="4x4">, v_Padding)/

<font face="Hack" [v_FontColumnTitle]>/
    <b>[v_Padding]TRACK                [v_Padding]STATS<//b><br>/
   
    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Pick/
        Repeat(/ , Math([v_LabelMaxLen] - 10))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [v_Track Pick]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Pick])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Popularity/
        Repeat(/ , Math([v_LabelMaxLen] - 16))/
    <//font>[v_Padding]/
    <font  [v_FontColor] [v_FontValueBGColor]>/
        / [v_Track Popularity]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Popularity])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor] color="#000000">/
        / Track Ranking/
        Repeat(/ , Math([v_LabelMaxLen] - 13))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor] color="#000000">/
        / [v_Track Ranking]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Ranking])))/
    <//font><br>[v_Padding]<br>/


    <font [v_FontColor] [v_FontLabelBGColor] color="#000000">/
        / Track Rating/
        Repeat(/ , Math([v_LabelMaxLen] - 12))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor] color="#000000">/
        / [v_Track Rating]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Rating])))/
    <//font><br>[v_Padding]<br>/


    <font [v_FontColor] [v_FontLabelBGColor] color="#000000">/
        / Track Rating Date/
        Repeat(/ , Math([v_LabelMaxLen] - 17))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor] color="#000000">/
        / [v_Track Rating Date]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Rating Date])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor] color="#000000">/
        / Track Play Count/
        Repeat(/ , Math([v_LabelMaxLen] - 16))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor] color="#000000">/
        / [v_Track Play Count]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Play Count])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor] color="#000000">/
        / Track Play Counter/
        Repeat(/ , Math([v_LabelMaxLen] - 18))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor] color="#000000">/
        / [v_Track Play Counter]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Play Counter])))/
    <//font><br>[v_Padding]<br>/


    <font [v_FontColor] [v_FontLabelBGColor] color="#000000">/
        / Track Play Date/
        Repeat(/ , Math([v_LabelMaxLen] - 15))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor] color="#000000">/
        / [v_Track Play Date]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Play Date])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor] color="#111111">/
        / Track Skip Count/
        Repeat(/ , Math([v_LabelMaxLen] - 16))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [v_Track Skip Count]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Skip Count])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor] color="#000000">/
        / Track Skip Counter/
        Repeat(/ , Math([v_LabelMaxLen] - 18))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor] color="#000000">/
        / [v_Track Skip Counter]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Skip Counter])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor] color="#000000">/
        / Track Skip Date/
        Repeat(/ , Math([v_LabelMaxLen] - 15))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor] color="#000000">/
        / [v_Track Skip Date]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Skip Date])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor] color="#000000">/
        / Track Play Score/
        Repeat(/ , Math([v_LabelMaxLen] - 16))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor] color="#000000">/
        / [v_Track Play Score]Repeat(/ ,Math([v_ValueMaxLen] - Length([v_Track Play Score])))/
    <//font>/
<//font>
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #192 on: February 20, 2024, 12:37:49 pm »

@Lepa. I'm trying to understand your last example on your post. I understand you don't have my fields and you have to do variables. But what I don't understand is you have something which I didn't see till now.
Code: [Select]
Save(20, v_LabelMaxLen)/
Save(20, v_ValueMaxLen)/
Save(color="#111111", v_FontColor)/
Save(bgcolor="#CECDEB", v_FontLabelBGColor)/
Save(bgcolor="#FFAED7", v_FontValueBGColor)/
Save(color="#17B4FF", v_FontColumnTitle)
Save(<img src="tooltip:MISC//Separator//1x1-transparent" size="4x4">, v_Padding)/
Those are part of language expression or yours? Or those are saved for later use in the expression? I think some information has to be updated in html properties to match the new changes. I didn't find anywhere to understand what has be changed.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #193 on: February 20, 2024, 01:48:37 pm »

those are just helper variables which are used in the actual expression. This way you don't need find these values in the actual expression and change the values in the multiple places. Just edit variables font color and every font color in the expression gets the same color. Or if you want to change label bg color, just change value for v_FontLabelBGColor and every label bg color will use that color. So not necessary when you are creating expression but I find them helpful when trying things like changing colors and sizes

This now uses same fields than you did have. you need to have image "tooltip:MISC//Separator//1x1-transparent" which sets the padding. Could be that placeholder also respects the size ("4x4") so if image is not found MC still reserves that space
Code: [Select]
Save(20, v_LabelMaxLen)/
Save(20, v_ValueMaxLen)/
Save(color="#111111", v_FontColor)/
Save(bgcolor="#CECDEB", v_FontLabelBGColor)/
Save(bgcolor="#FFAED7", v_FontValueBGColor)/
Save(color="#17B4FF", v_FontColumnTitle)
Save(<img src="tooltip:MISC//Separator//1x1-transparent" size="4x4">, v_Padding)/

<font face="Hack" [v_FontColumnTitle]>/
    <b>[v_Padding]TRACK                [v_Padding]STATS<//b><br>/
   
    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Pick/
        Repeat(/ , Math([v_LabelMaxLen] - 10))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [Track Pick]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Pick])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Popularity/
        Repeat(/ , Math([v_LabelMaxLen] - 16))/
    <//font>[v_Padding]/
    <font  [v_FontColor] [v_FontValueBGColor]>/
        / [Track Popularity]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Popularity])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Ranking/
        Repeat(/ , Math([v_LabelMaxLen] - 13))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]">/
        / [Track Ranking]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Ranking])))/
    <//font><br>[v_Padding]<br>/


    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Rating/
        Repeat(/ , Math([v_LabelMaxLen] - 12))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [Track Rating]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Rating])))/
    <//font><br>[v_Padding]<br>/


    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Rating Date/
        Repeat(/ , Math([v_LabelMaxLen] - 17))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [Track Rating Date]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Rating Date])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Play Count/
        Repeat(/ , Math([v_LabelMaxLen] - 16))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [Track Play Count]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Play Count])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Play Counter/
        Repeat(/ , Math([v_LabelMaxLen] - 18))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [Track Play Counter]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Play Counter])))/
    <//font><br>[v_Padding]<br>/


    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Play Date/
        Repeat(/ , Math([v_LabelMaxLen] - 15))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [Track Play Date]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Play Date])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Skip Count/
        Repeat(/ , Math([v_LabelMaxLen] - 16))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [Track Skip Count]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Skip Count])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Skip Counter/
        Repeat(/ , Math([v_LabelMaxLen] - 18))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [Track Skip Counter]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Skip Counter])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Skip Date/
        Repeat(/ , Math([v_LabelMaxLen] - 15))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [Track Skip Date]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Skip Date])))/
    <//font><br>[v_Padding]<br>/

    <font [v_FontColor] [v_FontLabelBGColor]>/
        / Track Play Score/
        Repeat(/ , Math([v_LabelMaxLen] - 16))/
    <//font>[v_Padding]/
    <font [v_FontColor] [v_FontValueBGColor]>/
        / [Track Play Score]Repeat(/ ,Math([v_ValueMaxLen] - Length([Track Play Score])))/
    <//font>/
<//font>
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #194 on: February 21, 2024, 08:15:06 am »

On version 31 when using https://wiki.jriver.com/index.php/Expression_Language#HTML_Font_Properties (some features are missing there), one of them is that when using valign"value" it doesn't take in consideration the vertical alignment of the font in version 32.

Below is my expression:
Code: [Select]
If(isempty([number plays]),<font face="ubuntu mono"size="90"valign="bottom">--<//font>,<font face="ubuntu mono"size="90"valign="bottom">PadNumber([number plays],2)<//font>
<font face="ubuntu mono"size="90"valign="bottom">fixcase(FormatDate([Last Played, 0],yyyy-MM-%d hh:mm, %A),1)<//font>
)
Code: [Select]
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #195 on: February 21, 2024, 09:49:54 am »

It isn't supported everywhere for sure. I was thinking in context of tooltip and theaterview screen where it should be available. I have used it in the player top panel and there it seems to be working. not sure about other places in the standard view. at least thumbnail text seems to not supports valign
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #196 on: February 21, 2024, 10:38:44 am »

it is actually supported also with thumbnail text. It just that because there is no empty vertical space anymore with font the middle,top and bottom are almost the same thing. This can be verified by using bigger font and then do valings with smaller size fonts
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10968
Re: Custom Tooltips/TheaterView Screens
« Reply #197 on: February 21, 2024, 12:01:04 pm »

If there is a fixed-size UI element it gets drawn into, it needs to be passed the full size externally so it actually knows where top and bottom is. If this is not the case, then it'll just make the line the size of the biggest element, and thus alignment makes no difference.
We can potentially look into fixing such cases, if you document where exactly these occur. Although depending on how the UI is made in that part, there is not necessarily a guarantee.
Logged
~ nevcairiel
~ Author of LAV Filters

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: Custom Tooltips/TheaterView Screens
« Reply #198 on: February 21, 2024, 12:15:04 pm »

This change has have benefits to me. I can use e.g 1xX pixel image to set the height if I need some spacing but now there isn't forced spacing anymore which suits me
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Custom Tooltips/TheaterView Screens
« Reply #199 on: February 21, 2024, 12:55:46 pm »

Then why in version 31 is working but not in 32 in standard view?

Code: [Select]
<font face="ubuntu mono"valign="bottom">bottom<//font>/ <font face="ubuntu mono"valign="medium">medium<//font>/ <font face="ubuntu mono"valign="top">top<//font>
Logged
Pages: 1 2 3 [4] 5   Go Up