Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: antigen on March 17, 2008, 06:29:57 AM

Title: Subline question
Post by: antigen on March 17, 2008, 06:29:57 AM
Hi,

I only found out about Rockbox a couple days ago and have already started trying to customize myself a theme.

A quick question:

I want to display the current position in the song and time remaining in the song on the same line and have it so they are both set out a different distance from the left margin.  Is there any way, using sublines and left alignment, to display both continually (i.e. not alternating)?

I want it so that if the time reaches 10:00 on either readout, their orientation with respect to the left side of the screen does not change.
Title: Re: Subline question
Post by: Mikerman on March 17, 2008, 12:24:47 PM
Would it work for you to use the align right and align center codes for the 2 pieces of information?
Title: Re: Subline question
Post by: antigen on March 17, 2008, 04:28:38 PM
It would work, but I was hoping to have the info inset from the sides of the screen a little.

This code gives me the correct positioning:

%m|14|%al%pc;%m|135|%al-%pr

It's just that the second subline defaults to alternating every 2 seconds.

Does anyone know how to display the second subline continually?
Title: Re: Subline question
Post by: MarcGuay on March 17, 2008, 04:35:44 PM
It's just that the second subline defaults to alternating every 2 seconds.

Does anyone know how to display the second subline continually?

I think the point of sublines is that they alternate.  If you lose the semi-colon it should do what you want.

Edit: or maybe you can't have two left margin tags on the same line?
Title: Re: Subline question
Post by: antigen on March 17, 2008, 04:59:09 PM
I think the point of sublines is that they alternate.  If you lose the semi-colon it should do what you want.

Edit: or maybe you can't have two left margin tags on the same line?

Yeah seems like it.

Anyway, I just figured out a way to do it.  What I did was inset the current position of the song from the left using left align and then user right align on the other.  To get the text on the right to come out from the right margin I added a couple of spaces after the code in that line.

It now looks like this (highlight to see spaces):

%m|13|%al%pc%ar-%pr    


Thanks guys.
Title: Re: Subline question
Post by: Mikerman on March 18, 2008, 01:25:54 PM
That's exactly what I have done in the past, given the one align-from-x per line limitation.  It's a kludge, but it works.  (And at times, I think that life is one big kludge anyway ...)