IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Columns UI - how to make 'now playing' bold
arnstein
post Sep 25 2006, 01:58
Post #1





Group: Members
Posts: 45
Joined: 2-September 06
Member No.: 34725



I am not a programmer so I have been customizing Foobar2K slowly and without much confidence. Using columns ui, how and where do I go to make the line in my playlist that shows the currently playing song to have bold text? As an alternative, I could change the color of the background of that line -- the default colors does this already, but only faintly and if I have another line selected it is already is darker than the now playing line. I could not tell in the columns ui preferences which line I was formatting for the tume 'now playing.' I'm not sure what 'inactive selection' means in this context, as I assume I am looking for the 'active selection". Thanks for everybody's help. Little by little I am getting this program to do what I want, but it's not easy for a non-technical person. arnstein
Go to the top of the page
+Quote Post
Yotsuya
post Sep 25 2006, 02:11
Post #2





Group: Members
Posts: 1535
Joined: 8-May 06
Member No.: 30546



Generally speaking you can use $if(%isplaying%,$rgb(r1,g1,b1,r2,g2,b2),) where r1,g1,b1 is the color of the now playing text normally, and r2,g2,b2 is the color of the text when selected. This will change the color of the text however I do not know of anyway to change font attributes such as bold and italic with the columnsui playlist.

However, if you change to the single column playlist you can use $if(%isplaying%,$font(,,bold,),)

Edit: When I used the columnsui playlist I would use $set_style() to change the background color of the now playing item. However, I have since switched to single column playlist.

This post has been edited by Yotsuya: Sep 25 2006, 02:16


--------------------
http://www.ubuntu.com
Go to the top of the page
+Quote Post
arnstein
post Sep 25 2006, 15:04
Post #3





Group: Members
Posts: 45
Joined: 2-September 06
Member No.: 34725



Thanks for this, however, forgive my utter ignorance, where do I write that string -- and I realize I will have to choose color values for the rgb. One other question -- is there a way to save my entire configuration and reload it in case I screw up something as I a m tinkering around? Thanks for helping me out. arnstein
Go to the top of the page
+Quote Post
Yotsuya
post Sep 25 2006, 18:12
Post #4





Group: Members
Posts: 1535
Joined: 8-May 06
Member No.: 30546



First you need to pick some colors for your backgrounds. Then we can go define those colors as global playlist variables and make it easier to use those colors.

File> Preferences> Display> Columns UI> Playlist View> "Globals" Tab

About halfway down the page, select the "Variables" tab. Here we can set the colors you want to use like this:

CODE
$set_global(color.bg.single,$rgb(166,202,240))
$set_global(color.bg.album,$rgb(140,186,236))
$set_global(color.bg.playing,$rgb(58,110,165))
$set_global(color.bg.selected,$rgb(10,36,106))


Toward the top of the page make sure this box is checked so that we can use these variables in the column display:
[x] Use global variables for display

File> Preferences> Display> Columns UI> Playlist View> "Columns" Tab

Now that we have defined some colors to use (replace those above with whatever makes you happy) we can put them in our columns. On the left side of the page there should be a box called "Columns". Select the column you would like to change the color for.

Toward the center of the page there should be a few tabs, select the tab called "Style". If you already have a bunch of code then paste it and we can help you modify it, but basically you need to add a line like:

CODE
$set_style(back,
$if(%isplaying%,$get_global(color.bg.playing),
$if(%tracknumber%,$get_global(color.bg.album),$get_global(color.bg.single))
),
$get_global(color.bg.selected)
)


Toward the top of the page make sure this box is checked so that we can use the style in the main display:
[x] Use Custom Style Spec

You'll need to define the style for every column you would like to color. Select the different columns from the "Columns" box and repeat the style code in the "Style" tab for each column. Copy/paste is your friend.

Once you have defined the style for each column click [Apply], [Save All], and [Close].

This post has been edited by Yotsuya: Sep 25 2006, 18:21


--------------------
http://www.ubuntu.com
Go to the top of the page
+Quote Post
arnstein
post Sep 25 2006, 21:52
Post #5





Group: Members
Posts: 45
Joined: 2-September 06
Member No.: 34725



Hmm. I tried what you said but nothing changed. Here's a link to what foobar looked like after I made your changes. Exactly like it did before. Unless the colors you suggested were identical to defaults. The highlit song hides the now playing color, unfortunately, but it's the slightly bluer version of the alternating foobar stripe. Gratefully, arnstein

http://img228.imageshack.us/my.php?image=foobar2kkq0.jpg
Go to the top of the page
+Quote Post
Yotsuya
post Sep 25 2006, 22:05
Post #6





Group: Members
Posts: 1535
Joined: 8-May 06
Member No.: 30546



Could you post the style and global pages for your current config? Maybe other code is overriding what we added?


--------------------
http://www.ubuntu.com
Go to the top of the page
+Quote Post
arnstein
post Sep 26 2006, 02:12
Post #7





Group: Members
Posts: 45
Joined: 2-September 06
Member No.: 34725



OK - almost there. I hadn't checked 'use custom style spec" on all the columns.
Looks very nice, but with a couple of issues.
1. #69 - Stone Crazy is the selected file, not the one playing. This looks OK. But #70 - I'm Set Free -- I wish to change the font color as the black does not read well under the darker blue; should be red perhaps, something to make it different from both selected and all non selected. I like the darker color here for the background, nice choice.

2. For some unknown reason #77 - Generation 05 is highlighted with a lighter color, and I don't know why, as it is neither selected nor playing.

Here are my globals for variables:

$set_global(color.bg.single,$rgb(166,202,240))
$set_global(color.bg.album,$rgb(140,186,236))
$set_global(color.bg.playing,$rgb(58,110,165))
$set_global(color.bg.selected,$rgb(10,36,106))

Here are my globals for style:

$if(%_isplaying%,

$puts(back,$offset_colour(%_back%,$offset_colour($calculate_blend_target(%_back%),ff0000,20),25))
$puts(back-selected,$offset_colour(%_selected_back%,$offset_colour($calculate_blend_target(%_selected_back%),ff0000,20),25))
$puts(back-selected-no-focus,$offset_colour(%_selected_back_no_focus%,$offset_colour($calculate_blend_target(%_selected_back_no_focus%),ff0000,20),25))
,

$ifequal($mod(%_playlist_number%,2),0,
$puts(back,$offset_colour(%_back%,$calculate_blend_target(%_back%),12))
$puts(back-selected,%_selected_back%)
$puts(back-selected-no-focus,%_selected_back_no_focus%)
,
$puts(back-selected,$offset_colour(%_selected_back%,$calculate_blend_target(%_selected_back%),7))
$puts(back-selected-no-focus,$offset_colour(%_selected_back_no_focus%,$calculate_blend_target(%_selected_back_no_focus%),7))
$puts(back,%_back%)
)

)
$set_style(back,$get(back),$get(back-selected),$get(back-selected-no-focus))

http://img136.imageshack.us/my.php?image=foobarbluecb7.jpg

Can't thank you enough, Yotsuya. Let me know if you need any other info. Arnstein
Go to the top of the page
+Quote Post
Yotsuya
post Sep 26 2006, 02:58
Post #8





Group: Members
Posts: 1535
Joined: 8-May 06
Member No.: 30546



Issue #1: Text Color

Above, all we played around with were the background colors, but text color can be manipulated very similarly.
Pick some colors and add them to your global variables like we did before:

CODE
// Text
$set_global(color.txt.single,$rgb(0,0,0))
$set_global(color.txt.album,$rgb(0,0,0))
$set_global(color.txt.playing,$rgb(233,233,233))
$set_global(color.txt.selected,$rgb(233,233,233))

// Backgrounds
$set_global(color.bg.single,$rgb(166,202,240))
$set_global(color.bg.album,$rgb(140,186,236))
$set_global(color.bg.playing,$rgb(58,110,165))
$set_global(color.bg.selected,$rgb(10,36,106))


A note about the style tab, the code in there is the default code which you can see the effect of in your existing "number" column. We are overriding these settings with our display style. When you have everything set up the way you like you may want to clear out the style tab, or you may wish to leave it as the default for any future columns. Or, you can copy/paste one of the individual column style tabs into the global style tab so that your new settings become the default for all columns.

Basically, all columns use the style defined in the global style tab unless you check the box for "use custom style spec" for the column.. in which case it uses the style defined in it's own tab.

Now that we have defined some text colors we need to go back to the column style tabs and set the styles to use the colors. Similar to before we can add code like this:

CODE
// Text
$set_style(text,
$if(%isplaying%,$get_global(color.txt.playing),
$if(%tracknumber%,$get_global(color.txt.album),$get_global(color.txt.single))
),
$get_global(color.txt.selected)
)

// Backgrounds
$set_style(back,
$if(%isplaying%,$get_global(color.bg.playing),
$if(%tracknumber%,$get_global(color.bg.album),$get_global(color.bg.single))
),
$get_global(color.bg.selected)
)


Issue #2: Number 77

I suspect the reason item number 77 is appearing with a lighter color is because the code I have given includes the ability to color tracks differently depending on wether or not they have a track number defined in their tag. Right click on number 77 and select properties, I think you will find that it has no track number. The reason I did this is because with a proper sorting string you can group tracks together that belong to albums and have those albums colored differently to set them apart from loose single tracks. Many people use this method and I am actually helping another user accomplish that.

If you do not wish to utilize this behavior replace the lines of code that look like this:
CODE
$if(%tracknumber%,$get_global(color.bg.album),$get_global(color.bg.single))

with something that simply sets the color like this:
CODE
$get_global(color.bg.single)

or if you like the alternating line colors like the default style:
CODE
$ifequal($mod(%_playlist_number%,2),0,$get_global(color.bg.single),$get_global(color.bg.album))


As always feel free to change those colors to anything you like, the colors I have given you are from a blue color scheme I used before I switchd to foo_uie_single_column_playlist.. because that's the code I have laying around in my columnsui playlist config.

This post has been edited by Yotsuya: Sep 26 2006, 03:23


--------------------
http://www.ubuntu.com
Go to the top of the page
+Quote Post
arnstein
post Sep 26 2006, 21:28
Post #9





Group: Members
Posts: 45
Joined: 2-September 06
Member No.: 34725



I like the blue format, Yotsuya, not a big fan as some are here of the intense, black backgrounds, flashing lights and buzzers. Everything works as it should for now. My only question not yet answered is what do you do if you like a format such as this and want to save it, and then want to fiddle around some more with colors, etc. Is there a way to reload the saved format or do you have to note all the code changes and hand code them back? As for the lighter bar for those items without track numbers, what a great way for me to clean up my database and get all those pesky track numbers in. Thanks again. Foobar 2K's an amazing thing but what a learning curve for the non-coders out there. arnstein
Go to the top of the page
+Quote Post
Yotsuya
post Sep 26 2006, 21:42
Post #10





Group: Members
Posts: 1535
Joined: 8-May 06
Member No.: 30546



File> Preferences> Display> Columns UI> "Main" Tab

There are two buttons [Import] and [Export] that will allow you to manage .fcs files. .fcs files do not manage all foobar settings but they do manage most of the ColumnsUI settings including the playlist style we just discussed. You can use this to "back up" your columns ui config and restore it later.

Alternatively you can zip up your entire foobar directory. If you installed with per-user settings you'll need to grab your appdata folder too.
C:\Program Files\foobar2000
C:\Documents and Settings\USERNAME\Application Data\foobar2000


--------------------
http://www.ubuntu.com
Go to the top of the page
+Quote Post
ezekiel2517
post Nov 18 2006, 01:33
Post #11





Group: Members
Posts: 15
Joined: 24-July 04
Member No.: 15711



just wanted to drop in and say I found this thread extremely useful for my own needs, thank you arnstein for raising the question in the first place and thank you yotsuya for breaking the topic down for us non-programmers in the audience.
Go to the top of the page
+Quote Post
Bad Monkey
post Aug 22 2007, 09:25
Post #12





Group: Members
Posts: 90
Joined: 22-August 07
Member No.: 46407



QUOTE
This will change the color of the text however I do not know of anyway to change font attributes such as bold and italic with the columnsui playlist.

So is there a way to set in Columns UI a particular bit of text to bold, or any other font variation?

I am trying to get the Artist column to be bold, everything else regular...

If not, seems quite a failing of what is otherwise a ridiculously powerful interface config!

This post has been edited by Bad Monkey: Aug 22 2007, 09:26
Go to the top of the page
+Quote Post
Susan
post Aug 30 2007, 20:55
Post #13





Group: Members
Posts: 7
Joined: 30-August 07
Member No.: 46645



thanks yotsuya for that explanation.
Go to the top of the page
+Quote Post
barry123
post Aug 30 2007, 21:30
Post #14





Group: Members
Posts: 146
Joined: 16-February 07
Member No.: 40674



QUOTE (Bad Monkey @ Aug 22 2007, 10:25) *
QUOTE
This will change the color of the text however I do not know of anyway to change font attributes such as bold and italic with the columnsui playlist.

So is there a way to set in Columns UI a particular bit of text to bold, or any other font variation?

I am trying to get the Artist column to be bold, everything else regular...

If not, seems quite a failing of what is otherwise a ridiculously powerful interface config!



I'd like to know that too.
because when I play something in a large playlist, and I click on another song I can't find the song I play at the moment!
so I need something so I can see easily the song that I play.

This post has been edited by barry123: Aug 30 2007, 21:46
Go to the top of the page
+Quote Post
eevan
post Aug 30 2007, 23:45
Post #15





Group: Members
Posts: 537
Joined: 9-April 07
From: Belgrade, Serbia
Member No.: 42357



This can help: Preferences > Columns UI > Status bar/Systray tab. Set the 'Action to perform when doubleclicking on status bar:' combo to View/Columns playlist/Activate now playing.


--------------------
If age or weaknes doe prohibyte bloudletting you must use boxing
Go to the top of the page
+Quote Post
Hayden54
post Feb 9 2008, 01:08
Post #16





Group: Members
Posts: 56
Joined: 30-January 08
Member No.: 50905



I'm trying to use yotsuya's style script and I want to customize the alternating lines part to be a bit more like the default.
If I understand correctly, the default config has a blend function - where it takes two colours and blends them together??

I want to have a greyish tinge to the blue colour (or any other colour i choose at a later date) that I have chosen.

Could somebody explain how the %offset_colour and $calculate_blend_target strings work

Any help would be greatly appreciated
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd October 2014 - 03:37