PitBull Unit Frames 4.0

406 - Right aligned text strings to not truncate

I've noticed that while left aligned strings truncate correctly when the text is longer than the bar it is placed in, right aligned strings do not and the text continues outside of the frame it's in. This is particularly noticeable on frames that are mirrored horizontally, i.e left aligned text is mirrored to become right aligned.

User When Change
Shefki Sun, 26 Jul 2009 05:04:06 Changed milestone from beta3 to None

Changed priority from High to Low
Shefki Thu, 16 Jul 2009 21:22:39 Changed milestone from beta2 to beta3
Shefki Sun, 28 Jun 2009 01:23:25 Changed milestone from None to beta2

Changed priority from Medium to High
Aethwyn Thu, 28 May 2009 23:31:41 Create

You must login to post a comment. Don't have an account? Register to get one!

  • 2 comments
  • Avatar of Shefki Shefki Sun, 26 Jul 2009 05:04:06

    After spending some time investigating this there's no good solution to this problem. It'll basically need to remain as a known limitation of PB4 for the time being.

    We don't actually size texts and let them dynamically size. The upside of this is the texts generally can use as much space as they want. However, it's desireable to prevent the texts from overlapping. In order to get both at least one text must be unbounded. The layout engine prefers to leave the middle anchored text unbounded. But will leave the right anchored text unbounded if there is no middle text.

    As I mentioned before you can force the right text to be truncated by setting a text to appear in the middle. Even if the text is blank. We could create a dummy text frame to force this always. However, this has negatives as well. When set like this the left and right text will only be able to use half of the width of the frame. Which is also not necessarily desirable to force on people.

    Even then this is much more complicated because in PB4 we allow more than one text to be anchored to the same position, which is different from PB3. When multiple texts are anchored to the same slot even more texts will end up becoming unbounded.

    The alternative fix for this is to set widths and provide a configuration for this. Which has its own set of negatives.

    So for the time being this will remain as is. You should consider using the Truncate for DogTagTexts and string.sub() for LuaTexts to truncate as you need if you're using more advanced layouts that require more control than our default truncation system.

  • Avatar of Shefki Shefki Mon, 20 Jul 2009 08:32:14

    Temporary workaround for you for the time being is to take and create a blank text and anchor it to the middle. This will cause a proper truncation. Eventually I'll make the layout engine smart enough to create a dummy frame for this purpose for us.

    Incidentally, PB3 had the same issues.

  • 2 comments

Facts

Last updated on
26 Jul 2009
Reported on
28 May 2009
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Low - Might slip to a later milestone.
Component
Core

Reported by

Possible assignees

Votes (Total: +2, Average: +2.0)