Odd scrolling in RollerCharLCD and RollerCharLCDLong

Issue #558 resolved
prl created an issue

When RollerCharLCD is used in the T4's skin_display (without picons) front panel skin, the text scrolls if it is longer that 16 characters, even if the text fits comfortably in the widget.

RollerCharLCD is used in the front panel skins for screens like the infobar (live TV) screen and in the channel selection screen.

When it does scroll, the initial display of the scroll text is only 16 characters wide, not the full width of the widget.

When it completes scrolling, it will normally be right justified, even if the actual justification of the widget is left or center.

RollerCharLCDLong behaves similarly, except that its critical lengths are 26 instead of 16.

The cause is the assumption in the widget code that the width of the widget is a fixed number of characters, and that the extended marquee text that is used for scrolling is used for the non-scrolling final display value.

If the scrolling widths are calculated from the actual widget width, the actual width of a space character and the actual screen width of the text, the scrolling only operates on strings that are at least as wide as the widget and it uses the full width of the widget for scrolling.

The scrolling remains a little uneven, because it is character-based, not pixel-based.

Replication Steps

In MENU>Setup>System>Front panel skin, set the skin to < Default >.

When the system has restarted, enter the channel selection screen. Navigate to a channel with a current event name that is greater than 16, but not much bigger (e.g. "Antiques Roadshow", 17 characters). After a 2-second delay, the front panel event name display will start scrolling, even though the name fits in the widget. The behaviour will be as described above.

Comments (2)

  1. Peter Urbanec

    Fix bug #558: Odd scrolling in RollerCharLCD and RollerCharLCDLong

    Change RollerCharLCD to use the actual pixel widths of the text, the space character and the widget to calculate the amount of padding in the marquee text.

    Always display the whole remaining marquee text, instead of a limited amount of it, so that it always uses the full widget width.

    When the scrolling is finished set the text to the original text.

    Remove dependence of the code on model types.

    This fix makes the string length workaround in RollerCharLCDLong unnecessary, so RollerCharLCDLong now simply inherits from RollerCharLCD and sets a different scroll start delay, which is its only remaining difference. It's mostly retained for backward compatibility.

    Because eLabel::calculateSize() can't return a width greater than eLabel::size(), this code will scroll if the text width is exactly the same as the widget width. I don't think that can be avoided.

    → <<cset 2e480509d7e9>>

  2. Log in to comment