Skip to main content
Topic: Columns UI NG Playlist: How to change groups background? (Read 11763 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Columns UI NG Playlist: How to change groups background?

I'm using NG Playlist. How can I change the groups background?

Columns UI NG Playlist: How to change groups background?

Reply #1
File> Preferences> Display> Columns UI> Playlist View> "Globals" Tab> "Style" SubTab
Search for a line at the bottom that looks something like this:
Code: [Select]
$set_style(back,$get(back),$get(back-selected),$get(back-selected-no-focus)))
Then right BEFORE it add a line like this:
Code: [Select]
$if(%_is_group%,$puts(back,$rgb(96,96,96)))
*Where $rgb(96,96,96) is the color you want for the background.


- and for the foreground -
File> Preferences> Display> Columns UI> Playlist View> "Grouping" Tab
- Double click on your grouping pattern from the list it to modify it.
- Add an $rgb() to the beginning of the grouping code to color the text.
- Click [OK]


- and for that pesky horizontal line -
File> Preferences> Display> Columns UI> Playlist View> "Globals" Tab> "Style" SubTab
Add a line to the bottom like this:
Code: [Select]
$if(%_is_group%,$set_style(text,$rgb(0,128,255)))
or you can combine it with the background color code like this:
Code: [Select]
$if(%_is_group%,
$puts(back,$rgb(96,96,96))
$set_style(text,$rgb(255,0,0))
)
* If you want to hide the line, make it the same color as the background.

Columns UI NG Playlist: How to change groups background?

Reply #2
Thank you very much, Yotsuya, that's a very thorough explanation.

However, my settings were transferred from the older foobar I set up years ago and go like this:

Code: [Select]
$set_style(text,$get_global(cTxtStd),$get_global(cTxtSel))

$set_style(back,
$ifequal($mod(%_playlist_number%,2),0,$get_global(cBgStd),$get_global(cBgAlt)),
$get_global(cBgSel))

$if(%isplaying%,$set_style(back,$get_global(cBgPlay),$get_global(cBgPlay)))


This shows alternate rows in different colour, also sets background colours for selection and now playing track.

The line with %_is_group% check doesn't change the groups background, no matter where I put it. It does change the line colour when I use the last code from your post. I also tried to combine $if(%_is_group%,...) with other parts of my code, but it doesn't make any difference - the groups background is cBgStd.

Could you please tell me how to change my code to make it work?

Columns UI NG Playlist: How to change groups background?

Reply #3
i think you have to use the main colours dialog in columns ui preferences to change the background colour.

Columns UI NG Playlist: How to change groups background?

Reply #4
The main color dialog in columns ui preferences will be overridden by the code so basically you need to change your 2nd code section, something like this:
Code: [Select]
$if(%_is_group%,
$set_style(back,$rgb(r,g,b)),

$set_style(back,
$ifequal($mod(%_playlist_number%,2),0,$get_global(cBgStd),$get_global(cBgAlt)),
$get_global(cBgSel)))


Just change $rgb(r,g,b) to whatever you want or reference to a color variable.

Columns UI NG Playlist: How to change groups background?

Reply #5
The main color dialog in columns ui preferences will be overridden by the code


you still need to use the colour preferences to change the overall background colour - for example below the album art. you can't do that via code, it only affects the playlist/headers.

Columns UI NG Playlist: How to change groups background?

Reply #6
Kind of off the discussion, but I always wanted to ask:
Where can I find some documentation about the "Columns UI-related" functions and variables?
The wiki is two years outdated, and each version of this great component just adds new unknown functions...
In the Style tab, I read %_themed%, %%_is_group%, and a lot more, but no explanations.
So, please, someone help.

Columns UI NG Playlist: How to change groups background?

Reply #7
Lan Yu:

Perhaps I should clarify, what exactly do you mean when you say you want to "change the groups background?  I assumed you meant the group header line. Do you mean the background for the actual playlist items? Or maybe the background color for the part of the playlist that has no entries?

If it is the header line then you need to modify your existing $set_style(back,):
Code: [Select]
$set_style(back,
$ifequal($mod(%_playlist_number%,2),0,$get_global(cBgStd),$get_global(cBgAlt)),
$get_global(cBgSel))

$if(%isplaying%,$set_style(back,$get_global(cBgPlay),$get_global(cBgPlay)))

The quick and easy way to do it would be to add the $if(%_is_group%) below your existing code so that it will override the colors for group headers like this:
Code: [Select]
$set_style(back,
$ifequal($mod(%_playlist_number%,2),0,$get_global(cBgStd),$get_global(cBgAlt)),
$get_global(cBgSel))

$if(%isplaying%,$set_style(back,$get_global(cBgPlay),$get_global(cBgPlay)))

$if(%_is_group%,$set_style(back,$rgb(96,96,96)))

It looks like you are defining other colors in:
File> Preferences> Display> Columns UI> Playlist View> "Globals" Tab> "Variables" SubTab
You may wish to define a variable such as cBgGrp and then reference it like this:
Code: [Select]
$set_style(back,
$ifequal($mod(%_playlist_number%,2),0,$get_global(cBgStd),$get_global(cBgAlt)),
$get_global(cBgSel))

$if(%isplaying%,$set_style(back,$get_global(cBgPlay),$get_global(cBgPlay)))

$if(%_is_group%,$set_style(back,$get_global(cBgGrp)))

--

If you want to change the background for individual playlist items you need to modify this part of your code:
Code: [Select]
$set_style(back,
$ifequal($mod(%_playlist_number%,2),0,$get_global(cBgStd),$get_global(cBgAlt)),
$get_global(cBgSel))

To something like this:
Code: [Select]
$set_style(back,$rgb(0,128,256),$get_global(cBgSel))

--

If you want to change the background for the empty part of the playlist that contains no entries you will need to change
File> Preferences> Display> Columns UI> Colours and Fonts> "Colours" Tab> Item / Background[/i]

Columns UI NG Playlist: How to change groups background?

Reply #8
Thanks a lot, Yotsuya! Yes, I was trying to change the background of the group titles. I can swear I tried what you suggested, but it only worked after you posted it 

Columns UI NG Playlist: How to change groups background?

Reply #9
And you can also add $tab() to the end of grouping code to remove that horizontal line.

 

Re: Columns UI NG Playlist: How to change groups background?

Reply #10
In earlier comments about removing the horizontal bar, it was suggested to make it the same colour as the background. But that also hides the artist and album (or whatever tags are selected in grouping). Is there any way of JUST removing the bar (not sure why it would have been there in the first place?!)

 
SimplePortal 1.0.0 RC1 © 2008-2019