Thursday, March 30, 2017

How to skin foobar2000 - Part 4

Read other parts:

Avoiding Truncated Panels


This is another trick I learned when creating JAM. The idea is, if you drag the foobar2000 window higher or wider, panels' row and/or column doesn't get truncated because lacks of space. For example if you use ELPlaylist and it has 560px of height, and you set each row to 50px, the panel will display 11 rows instead of 12 rows but the lowest row gets truncated. This trick is taking advantage of foobar2000 incapabilities of counting math down to decimals.

Components required :
Columns UI 
Panels Stack Splitter 
ELPlaylist 
UI Hacks 
*copy the dll files to components folder

1. Install foobar on portable mode, select Columns UI when you open foobar2000.


1 by FlipOut69


2. Go to Preferences -> Display -> Columns UI-> Layout tab -> remove Vertical Splitter and NG Playlist, add Panel Stack Splitter then insert ELPlaylist under Panels Stack Splitter. Click apply.


2 by FlipOut69
3. Still on Columns UI page, go to status bar tab and uncheck 'show status pane'.

3 by FlipOut69
4. Remove all toolbar panels (menu, buttons, etc). Set the minimum window size to 500px x 500px from Prefs -> Display -> Main Window -> minimum size. Click OK. resize window to 500px x 500px.

4 by FlipOut69

5. Download ELPlaylist configuration file from : 1drv.ms/u/s!Av2zK_6HFiBKuECaqS…
Import it by right-clicking on ELP panel -> Settings -> Import -> ELP.elp. Drag and drop at least 1 album of your songs to foobar2000 window.

5 by FlipOut69
7. Right-click on empty area -> Splitter settings -> PanelList tab -> Rename ELPlaylist caption to 'ELP', check 'forced layout' and click apply. 

6 by FlipOut69

From this screenshot you can easily see that the songs at the bottom ('Space Bound') gets truncated because lack of space.
8. Still on Splitter settings, go to Script tab -> Copy-paste these code :
$puts(AddHeight1,$div($sub(%_height%,20),50))
$puts(PHeight1,$mul($get(AddHeight1),50))
$movepanel_c(ELP,0,20,%_width%,$get(PHeight1))

7 by FlipOut69
The first variable will measure the current height of the window and divide it by 50 (row's height in pixel).
The second variable will multiplying it back to 50px. 

9. You can also use the math (dividing and multiplying) for panel's width, the theory is same.

Good Luck!

Rangga

Author

0 comments:

Post a Comment