Should halign="right" left align if it overflows?

Moderators: Gully, peteru

Post Reply
prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Should halign="right" left align if it overflows?

Post by prl » Wed May 09, 2018 17:15

halign="right" right aligns when noWrap is set and the text overflows the available space. This means that the left end of the text is truncated.

halign="center" left aligns when noWrap is set and the text overflows the available space and preserves the left end of the text. I think halign="right" should do the same.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

IanSav
Uber Wizard
Posts: 16846
Joined: Tue May 29, 2007 15:00
Location: Melbourne, Australia

Re: Should halign="right" left align if it overflows?

Post by IanSav » Wed May 09, 2018 17:37

Hi Prl,

As an initial reaction I would say that the way it works now is better.

That said, I would welcome your thoughts on the matter to see if I should change my opinion.

Regards,
Ian.

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Should halign="right" left align if it overflows?

Post by prl » Wed May 09, 2018 17:59

The question arose when I was testing the multi-genre code for IceTV. In the default skins, the genre is often displayed right aligned (facing a left-aligned rating on the same line.

For example, if the genre text is cut off because of lack of space, I'd prefer:
Entertainment, Talk show, Var [iety]
to
rtainment, Talk show, Variety
which is how it's currently displayed

I can't readily find a real overflow instance, but I have seen it in testing.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

IanSav
Uber Wizard
Posts: 16846
Joined: Tue May 29, 2007 15:00
Location: Melbourne, Australia

Re: Should halign="right" left align if it overflows?

Post by IanSav » Wed May 09, 2018 18:07

Hi Prl,

Yes, I see your point. This is a case where RHS truncation would appear better.

I am used to seeing long entries, like path names, being truncated on the left and to me that is better.

Could this be a case for creating a new alignment type that has the behaviour you describe? Alternatively, could the code behind the display get the control screen width and adjust the text content to suit? I must admit that I am concerned that there is a display item that can have such a wide range of content widths.

Regards,
Ian.

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Should halign="right" left align if it overflows?

Post by prl » Wed May 09, 2018 19:14

It's not the only one, as star6key's recent posts show, but yes, sometimes left truncation is better (as for pathnames). I'd be happy with an additional alignment type.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Post Reply

Return to “Developers Community”