Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: PDXmatt on August 28, 2017, 10:53:13 PM

Title: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: PDXmatt on August 28, 2017, 10:53:13 PM
I started using rockbox recently on my Sansa clip+, I like it a lot but I do really like the UI on the original firmware. The Classic theme by Mika Järvi is almost identical, but I can't see the volume bar when I change the volume on the now playing screen. I tried editing the wps file myself but I couldn't figure it out.
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: PDXmatt on August 28, 2017, 11:03:26 PM
I know there's the Simplicity and Simplicity v2 themes, but they're not quite the same as the classic theme. I tried editing the wps of Simplicity v2 as well, but it always ended up messed up. Is there anybody here that could maybe add a volume bar to the Classic theme, or show me how to add it? I found this (https://github.com/skratchdot/rockbox-theme-classic-v2) but it appears he never actually started on it.
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: Bilgus on August 29, 2017, 04:43:48 AM
Have you tried my theme PlusEsque
http://themes.rockbox.org/index.php?themeid=2553&target=sansaclipplus

With the addition of fonts it should be pretty similar.

If not you could always use the volume bar code, it is pretty well commented
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: gomezz on August 29, 2017, 05:41:50 AM
TBH I only need to see the volume control setting when changing between different headphones (-15/-18) or external speaker (-3) to get a rough base setting.  After that it is all done by ear.  After all, there is a reason the best hi-fi kit does not have any markings on the volume control.  ;)
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: PDXmatt on August 30, 2017, 03:56:19 AM
Have you tried my theme PlusEsque
http://themes.rockbox.org/index.php?themeid=2553&target=sansaclipplus

With the addition of fonts it should be pretty similar.

If not you could always use the volume bar code, it is pretty well commented

Thanks, I'll give the volume bar code a shot, could you link it to me please?
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: PDXmatt on August 30, 2017, 04:00:41 AM
TBH I only need to see the volume control setting when changing between different headphones (-15/-18) or external speaker (-3) to get a rough base setting.  After that it is all done by ear.  After all, there is a reason the best hi-fi kit does not have any markings on the volume control.  ;)

Yeah, I adjust it by ear a lot of the time. It's just nice to have it available and it makes it more like the original firmware, which won't play AAC files.
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: PDXmatt on September 03, 2017, 12:50:29 AM
Something that's a little frustrating about the Clip+ is that text on the top part of the screen is yellow, and green on the rest. A big issue with this is on the top part of the screen the tail of a lowercase G will go under the yellow part and be colored differently.
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: PDXmatt on September 03, 2017, 03:10:44 AM
I've been trying to edit the Classic theme's fps file by comparing it to Simplicity's fps, but it completely screws it up somehow. I don't know what I could be doing wrong. Classic:

Code: [Select]
# BOTTOM LEFT
%V(0,48,-,-,0)
#
# play mode icon & progress bar
%?mp<|%xd(Aa)|%xd(Ab)|%xd(Ac)|%xd(Ad)>%pb(32,1,60,6,-)

Simplicity:

Code: [Select]
%V(0,48,93,-,0)
# (play mode icon & progress bar) or (volume bar if changing)
%?mv(1)<%xd(F)%pv(32,1,60,6,-)|%?mp<|%xd(Aa)|%xd(Ab)|%xd(Ac)|%xd(Ad)>%pb(32,1,60,6,-)>

I add the part of simplicity's code that I'm almost positive refers to the volume bar to Classic's code, changing (F) to (E) because that's the letter I assigned to speaker.bmp at the top, which I copied to Classic's resource folder in the WPS folder. So now Classic's code looks like this:

Code: [Select]
# BOTTOM LEFT
%V(0,48,-,-,0)
#
# play mode icon & progress bar or volume bar if changing
%?mv(1)<%xd(E)%pv(32,1,60,6,-)|%?mp<|%xd(Aa)|%xd(Ab)|%xd(Ac)|%xd(Ad)>%pb(32,1,60,6,-)

Somehow this makes the now playing screen completely out of alignment, I admit I know very little about programing but it seems like what I'm doing should work.
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: Bilgus on September 03, 2017, 05:04:24 PM
For PlusEsque:

If you downloaded the theme the volume bar code is already on your device see.. Device/.rockbox/wps/PlusEsque.wps it is also in the zipfile you downloaded from the themes site
relevant portions are %xl(D,volume10px.bmp,0,0,2); #Display Play/Volume Viewports; #VolLeft; #VolBar; #VolRight

for fonts see https://www.rockbox.org/wiki/CustomWPS#Fonts

I added this to the original PlusEsque.wps for you you'll need to change the font name to one that you like

Code: [Select]
#PlusEsque, Bilgus

%wd

%xl(A,mode8px.bmp,0,0,6)

%xl(B,battery8px.bmp,0,0,2)

%xl(C,rptshuf8px.bmp,0,0,2)

%xl(D,volume10px.bmp,0,0,2)
%Fl(2,14-Terminus.fnt,64) #Track info font (fontId, filename,#glyphs)

#

# Shuffle

%?ps<%xd(Ca)>

#

# Repeat

%V(17,0,11,8,0)

%?mm<|%xd(Cb)>

#

#Lock Icon

%V(-27,0,8,8,0)

 %?mh<%xd(Aa)>

#

# Playlist position & Vol db

%V(31,0,-31,-,0)

%?mv<%ac%pv|%ac%pp/%pe>

#

#Display Play/Volume Viewports

%?mv<%Vd(v)%Vd(b)|%Vd(p)>

#

# Battery

%V(-18,0,18,16,0)

%?St(battery display)<%?bp<%t(5)%xd(Bb);%t(5)+%bl|%xd(Ba)%Vd(g)>|%Vd(b)>#load battery icon or numeric value

%Vl(g,-15,2,12,5,0)#Battery level bar

%bl(0,0,11,4,invert,noborder)

#

#Numeric battery

%Vl(b,-18,0,18,16,0)

%?bp<%s+%bl|%bl>

#

# Track info

%V(0,17,128,27,2) #(x,y,w,h,fontid), uses font ID = 2

%s%ac%?it<%it|%fn>

%s%ac%?ia<%ia|Unknown Artist>

#

# Playing mode

%Vl(p,5,54,-,-,0)

%?mp<%xd(Ab)|%xd(Ac)|%xd(Ad)|%xd(Ae)|%xd(Af)>

#

#Progress bar

%pb(10,1,81,6)

#

# Time elapsed

%Vl(p,98,54,-,-,0)

%?if(%pc, >, 599)<%pc|0%pc>

#

#VolLeft

%Vl(v,0,54,-,-,0)

%xd(Da)

#

#VolBar

%pv(10,2,103,6)

#

# VolRight

%Vl(v,-10,54,-,-,0)

%xd(Db)
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: PDXmatt on September 03, 2017, 07:08:31 PM
For PlusEsque:

If you downloaded the theme the volume bar code is already on your device see.. Device/.rockbox/wps/PlusEsque.wps it is also in the zipfile you downloaded from the themes site
relevant portions are %xl(D,volume10px.bmp,0,0,2); #Display Play/Volume Viewports; #VolLeft; #VolBar; #VolRight

for fonts see https://www.rockbox.org/wiki/CustomWPS#Fonts

I added this to the original PlusEsque.wps for you you'll need to change the font name to one that you like

Code: [Select]
#PlusEsque, Bilgus

%wd

%xl(A,mode8px.bmp,0,0,6)

%xl(B,battery8px.bmp,0,0,2)

%xl(C,rptshuf8px.bmp,0,0,2)

%xl(D,volume10px.bmp,0,0,2)
%Fl(2,14-Terminus.fnt,64) #Track info font (fontId, filename,#glyphs)

#

# Shuffle

%?ps<%xd(Ca)>

#

# Repeat

%V(17,0,11,8,0)

%?mm<|%xd(Cb)>

#

#Lock Icon

%V(-27,0,8,8,0)

 %?mh<%xd(Aa)>

#

# Playlist position & Vol db

%V(31,0,-31,-,0)

%?mv<%ac%pv|%ac%pp/%pe>

#

#Display Play/Volume Viewports

%?mv<%Vd(v)%Vd(b)|%Vd(p)>

#

# Battery

%V(-18,0,18,16,0)

%?St(battery display)<%?bp<%t(5)%xd(Bb);%t(5)+%bl|%xd(Ba)%Vd(g)>|%Vd(b)>#load battery icon or numeric value

%Vl(g,-15,2,12,5,0)#Battery level bar

%bl(0,0,11,4,invert,noborder)

#

#Numeric battery

%Vl(b,-18,0,18,16,0)

%?bp<%s+%bl|%bl>

#

# Track info

%V(0,17,128,27,2) #(x,y,w,h,fontid), uses font ID = 2

%s%ac%?it<%it|%fn>

%s%ac%?ia<%ia|Unknown Artist>

#

# Playing mode

%Vl(p,5,54,-,-,0)

%?mp<%xd(Ab)|%xd(Ac)|%xd(Ad)|%xd(Ae)|%xd(Af)>

#

#Progress bar

%pb(10,1,81,6)

#

# Time elapsed

%Vl(p,98,54,-,-,0)

%?if(%pc, >, 599)<%pc|0%pc>

#

#VolLeft

%Vl(v,0,54,-,-,0)

%xd(Da)

#

#VolBar

%pv(10,2,103,6)

#

# VolRight

%Vl(v,-10,54,-,-,0)

%xd(Db)

I tried changing PlusEsque's code to what you provided, changing the font for 12-Nimbus.fnt, which is what Classic uses, so my code looks like this:

Code: [Select]
#PlusEsque, Bilgus

%wd

%xl(A,mode8px.bmp,0,0,6)

%xl(B,battery8px.bmp,0,0,2)

%xl(C,rptshuf8px.bmp,0,0,2)

%xl(D,volume10px.bmp,0,0,2)
%Fl(2,12-Nimbus.fnt,64) #Track info font (fontId, filename,#glyphs)

#

# Shuffle

%?ps<%xd(Ca)>

#

# Repeat

%V(17,0,11,8,0)

%?mm<|%xd(Cb)>

#

#Lock Icon

%V(-27,0,8,8,0)

 %?mh<%xd(Aa)>

#

# Playlist position & Vol db

%V(31,0,-31,-,0)

%?mv<%ac%pv|%ac%pp/%pe>

#

#Display Play/Volume Viewports

%?mv<%Vd(v)%Vd(b)|%Vd(p)>

#

# Battery

%V(-18,0,18,16,0)

%?St(battery display)<%?bp<%t(5)%xd(Bb);%t(5)+%bl|%xd(Ba)%Vd(g)>|%Vd(b)>#load battery icon or numeric value

%Vl(g,-15,2,12,5,0)#Battery level bar

%bl(0,0,11,4,invert,noborder)

#

#Numeric battery

%Vl(b,-18,0,18,16,0)

%?bp<%s+%bl|%bl>

#

# Track info

%V(0,17,128,27,2) #(x,y,w,h,fontid), uses font ID = 2

%s%ac%?it<%it|%fn>

%s%ac%?ia<%ia|Unknown Artist>

#

# Playing mode

%Vl(p,5,54,-,-,0)

%?mp<%xd(Ab)|%xd(Ac)|%xd(Ad)|%xd(Ae)|%xd(Af)>

#

#Progress bar

%pb(10,1,81,6)

#

# Time elapsed

%Vl(p,98,54,-,-,0)

%?if(%pc, >, 599)<%pc|0%pc>

#

#VolLeft

%Vl(v,0,54,-,-,0)

%xd(Da)

#

#VolBar

%pv(10,2,103,6)

#

# VolRight

%Vl(v,-10,54,-,-,0)

%xd(Db)
%Vl(p,5,54,-,-,0)
%?mp<%xd(Ab)|%xd(Ac)|%xd(Ad)|%xd(Ae)|%xd(Af)>
#
#Progress bar
%pb(10,1,81,6)
#
# Time elapsed
%Vl(p,98,54,-,-,0)
%?if(%pc, >, 599)<%pc|0%pc>
#
#VolLeft
%Vl(v,0,54,-,-,0)
%xd(Da)
#
#VolBar
%pv(10,2,103,6)
#
# VolRight
%Vl(v,-10,54,-,-,0)
%xd(Db)

The font changed, but only the song title shows up, the artist isn't displayed at all and the remaining time numbers go off the screen.
I really do appreciate your help, I just don't understand what I'm doing wrong.
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: PDXmatt on September 03, 2017, 07:25:54 PM
Originally I tried just adding %Fl(2,14-Terminus.fnt,64) #Track info font (fontId, filename,#glyphs) to the wps, but it did nothing. The same thing happened when I tried changing Classic's wps, I had to delete the # in front of the empty lines, but then the screen was messed up exactly like it is after changing PlusEsque's wps. Why is having spaces in between lines important?
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: Bilgus on September 03, 2017, 08:51:03 PM
Anything following # is a comment and is a comment all the way till the end of the line if you are having issues you might try pressing return just prior to the command to push it to a new line.

Really thinking about it, it could also be that you are using windows to edit the file and the /r/n (thats carriage return newline) is messing with the theme engine since linux only uses /n to denote newlines (not sure).

You might try Notepad++ for windows https://notepad-plus-plus.org/

It will keep the newline convention of the file as you edit it you can also set the new-line convention for NEW files by going to Settings>Preferences>New Document>'UNIX LF'
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: Bilgus on September 03, 2017, 08:57:19 PM
Here is PlusEsque.wps copied directly from my device with the edits you wanted to the font (works fine for my clip+)

--Edit sorry grabbed the wrong file
Title: Re: Volume bar on now playing screen with Classic theme on Sana clip+
Post by: PDXmatt on September 04, 2017, 11:32:35 PM
It worked, thank you for all your help! Maybe notepad is what was messing up my code. I already have notepad++, I'll try using that next time I edit wps files.