Value format in ML columns

  • 5 Replies
  • 3024 Views
*

Der_Rio

  • Beta Tester
  • Jr. Member
  • **
  • 78
    • View Profile
Value format in ML columns
« on: December 16, 2018, 12:04:37 PM »
In media library (old and new) number based columns should be right aligned (Year, Tracks, Length, Size).
And values with decimal point (Size) should have fixed decimal places ("#.00 MB").

Rio :)
Rio :)

*

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • 1989
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Value format in ML columns
« Reply #1 on: December 16, 2018, 04:25:23 PM »
Is there a reason for wanting the numbers right-aligned ? Not on a PC as I reply to see what explorer does for such cases.

The number formatting I'll need to check as I use the winamp localisation method to format the output. I've never personally liked trailing zeroes though I guess it makes things look aligned.

-dro

*

Der_Rio

  • Beta Tester
  • Jr. Member
  • **
  • 78
    • View Profile
Re: Value format in ML columns
« Reply #2 on: December 16, 2018, 05:57:11 PM »
For a single value I agree, thre is no need for trailing zeros.
But in tables it's easier to compare values this way.

E.g. Excel does it this way. And the podcast data columns in Winamp, too. ;)

In Explorer the file size IS right-aligned! At least on my PCs.
Rio :)

*

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • 1989
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Value format in ML columns
« Reply #3 on: December 18, 2018, 05:47:05 PM »
Doing the Explorer comparison, it just seems to be the file size that's right-aligned as you note with everything else left-aligned.

But I should probably try to be more consistent in how things are done so I need to update a lot of the library plug-ins now, heh. As the ones that are doing it (podcasts, playlists) is because I was mirroring the legacy plug-ins & didn't think about later plug-ins like ml_ll & making things more consistent in how they appear. Hopefully changing it generically won't be an issue for complaint &/or needing an option to customise it as that'll be a pain to manage.

With the size, I've had a bit of dig & the localisation api method being used does appear to use "#.00 MB" or just "# MB" depending on whether there's a fractional part of the size to display which is also like Explorer does (I can't remember if that's a method I added or api-fied it from existing winamp code at the time but I think I'll stick with using it for consistency at this time).

Does that seem ok then to just sort out the number column alignments for the ones you've mentioned along with playcounts & similar values ?

-dro

*

Der_Rio

  • Beta Tester
  • Jr. Member
  • **
  • 78
    • View Profile
Re: Value format in ML columns
« Reply #4 on: December 26, 2018, 01:21:50 AM »
The alignments look fine now in new local library. :)
Rio :)

*

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • 1989
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Value format in ML columns
« Reply #5 on: December 26, 2018, 11:47:55 PM »
Sweet, thanks for the confirmation & also the suggestion :)

-dro