INTERACT FORUM

More => Old Versions => JRiver Media Center 19 for Windows => Topic started by: magnust on December 28, 2013, 07:49:09 am

Title: How do I right justify numbers in a column?
Post by: magnust on December 28, 2013, 07:49:09 am
Can't find how I change from left to right justified in a column? It's much easier to read at a glance if it's right justified  :)

Title: Re: How do I right justify numbers in a column?
Post by: 6233638 on December 28, 2013, 07:50:39 am
You can't, and I really think it hurts Media Center's presentation.
Title: Re: How do I right justify numbers in a column?
Post by: MrC on December 28, 2013, 12:12:50 pm
Here's a way to help right align:

    http://yabb.jriver.com/interact/index.php?topic=79378.msg539564#msg539564 (http://yabb.jriver.com/interact/index.php?topic=79378.msg539564#msg539564)

It is not perfect, but works reasonably well with fields of known size constraints.  You'll have to format your own dB values from the raw field.
Title: Re: How do I right justify numbers in a column?
Post by: Hendrik on January 02, 2014, 06:20:37 am
In the next version of MC, all numeric columns will be right aligned.
Title: Re: How do I right justify numbers in a column?
Post by: 6233638 on January 02, 2014, 06:34:27 am
In the next version of MC, all numeric columns will be right aligned.
Awesome, thanks!
Title: Re: How do I right justify numbers in a column?
Post by: DoubtingThomas on January 02, 2014, 10:49:43 am
In the next version of MC, all numeric columns will be right aligned.

Great!   It that the next v19 build?
Title: Re: How do I right justify numbers in a column?
Post by: JimH on January 02, 2014, 10:57:08 am
Yes.
Title: Re: How do I right justify numbers in a column?
Post by: Hendrik on January 02, 2014, 10:58:21 am
I suppose I should've said "in the next build" instead, but yeah  ;D
Title: Re: How do I right justify numbers in a column?
Post by: phalanthus on January 03, 2014, 12:27:32 am
 ;D ;D ;D ;D ;D ;D ;D
Title: Re: How do I right justify numbers in a column?
Post by: magnust on January 03, 2014, 06:54:54 am
Nice!

 :)
Title: Re: How do I right justify numbers in a column?
Post by: ksvane on January 04, 2014, 05:39:51 am
Aesthetically, I liked it better the old way. Now, having a numeric column next to one with text looks hideous. Why not make it customizable?
Title: Re: How do I right justify numbers in a column?
Post by: Hendrik on January 04, 2014, 05:47:38 am
A couple people brought that up now, and I guess its just a matter of personal preference.
Ideal would be a number rendering mode which aligns all the numbers perfectly, but does so without right-aligning, but I guess thats just an impossible task to pull off.

We're thinking about making it configurable. Not sure how yet. Maybe per-column, maybe a global setting.
Title: Re: How do I right justify numbers in a column?
Post by: gappie on January 04, 2014, 06:44:02 am
Aesthetically, I liked it better the old way. Now, having a numeric column next to one with text looks hideous. Why not make it customizable?
but for now, you can use an expression to lineout left. take for instance track#, when using [Track #] it will line out left.

 :)
gab
Title: Re: How do I right justify numbers in a column?
Post by: JimH on January 04, 2014, 07:30:40 am
Aesthetically, I liked it better the old way. Now, having a numeric column next to one with text looks hideous. Why not make it customizable?
Would a space or two after the number help?
Title: Re: How do I right justify numbers in a column?
Post by: 6233638 on January 04, 2014, 09:40:35 am
I have been pushing for this ever since I started using Media Center, so I'm really happy to see it implemented.
 
Aesthetically, I think it's a big improvement overall - but there is still some room for improvement.
 
If a column is right-aligned, it seems like the header should be too.
 
 
For fields like Track #, it might read better if there is a period (and maybe a space?) after the number.
 
1.  Track Name reads better than 1 Track Name
 
 
For expressions, such as listitem([Peak Level (R128)],0), everything is still being left-aligned, and it would be nice to have some way of changing this even if it's not automatic.
 
 
I still feel that Media Center should be displaying an actual minus character rather than a hyphen for negative values to fix their alignment.
Title: Re: How do I right justify numbers in a column?
Post by: Hendrik on January 04, 2014, 09:51:38 am
Expressions are fixed in the next build, as long as you set their datatype, so ie. listitem([Peak Level (R128)],0)&DataType=[Number] will render properly right-aligned as a number.

Regarding the minus, even the actual minus does not line up perfectly with the +, and the hypen looks better (ignoring the alignment), IMHO anyway, but with right-alignment that shouldn't be a problem anymore.
Title: Re: How do I right justify numbers in a column?
Post by: 6233638 on January 04, 2014, 11:30:51 am
Expressions are fixed in the next build, as long as you set their datatype, so ie. listitem([Peak Level (R128)],0)&DataType=[Number] will render properly right-aligned as a number.
Thanks, thatʼs easy enough to change.

Regarding the minus, even the actual minus does not line up perfectly with the +, and the hypen looks better (ignoring the alignment), IMHO anyway, but with right-alignment that shouldn't be a problem anymore.
Thatʼs true—as long as they are right-aligned, it should no longer be an issue.
They do line up though—the minus character is the exact same width as a plus. It just looks out of place if youʼre used to seeing a hyphen.
Title: Re: How do I right justify numbers in a column?
Post by: MrC on January 04, 2014, 01:22:07 pm
Consider supporting the older HTML text align attribute:

   align="left|right|center|justify"
Title: Re: How do I right justify numbers in a column?
Post by: Hendrik on January 04, 2014, 01:24:09 pm
That could get ugly, since the html tags can be at multiple places in an expression. Not sure how to really deal with this.
To be honest, any alignment property inside the field itself would suffer from this.

At first i thought about an expression property similar to &datatype, but it has the same problem.
Title: Re: How do I right justify numbers in a column?
Post by: MrC on January 04, 2014, 01:26:54 pm
Exactly.

This also provides a solution for folks who want to recreate the capabilities of the special Album custom group by header.  They can then add elements to an expression to right-justify some components:

   [Album] by [Artist]<font align="right">[Date]<//font>

Numeric justification can be done by field width and padding in these situations.
Title: Re: How do I right justify numbers in a column?
Post by: MrC on January 04, 2014, 01:28:34 pm
I responded quickly after you, so our conversation may seem disjoint.

At first i thought about an expression property similar to &datatype, but it has the same problem.

To me, datatype and alignment are entirely independent, and should be divorced (although smart defaults based on datatype is fine).
Title: Re: How do I right justify numbers in a column?
Post by: Hendrik on January 04, 2014, 01:31:05 pm
Oh, I was hoping to be fast enough since the problem occured to be in the moment i clicked post and then had to edit. ;)

It would seem to be a good solution to the problem, I wonder however if the text renderer is smart enough to pull it off.
Title: Re: How do I right justify numbers in a column?
Post by: MrC on January 04, 2014, 01:31:41 pm
...I wonder however if the text renderer is smart enough to pull it off.

If not, Hendrik is.
Title: Re: How do I right justify numbers in a column?
Post by: Hendrik on January 04, 2014, 01:35:38 pm
Well, simple cases like <font align="left">[Field]&DataType=[Numeric]<//font> are one thing, but a combination of left and right, and maybe even center..

I guess something to research!