Unable to edit long file names

Issue #317 resolved
Peter Urbanec created an issue

Trying to rename a file using the virtual keyboard will not scroll left more than 20+ characters as the keyboard only shows the last ~20 characters.

Reproduction steps

Select a long file name in media player and try to rename the file. When editing filename, use the on screen keyboard left arrow to move cursor left past the end of the displayed area. The cursor disappears and edits can not be seen.

Comments (5)

  1. Peter Urbanec reporter
    • removed issue_status

    The issue was updated with the following change(s):

    • The status has been updated, from New to Confirmed.
  2. IanSav

    This issue may also be behind a problem with the "NumericalTextInputHelpDialog" screen in Screens/NumericalTextInputHelpDialog.py .

    In this screen the text display for the SMS helper can wrap and span multiple lines. This is fine for the initial and static text display. However, when the user starts keying in digits to start entering text the display converts the multi-line text display for that digit into a tall single line text entry box. For the longer text strings like that on the '0' key (or many digits when using non English character sets) the beginning and end of the text string fall outside the display window (due to the text centring) and suffer from the same (or comparable issue) to the originally reported issue.

    Given that the text is capable of being fully displayed over the two provided lines it would be great if this instance of the problem could be solved by allowing the edit control to work over the same two lines.

  3. prl

    I've been looking at how to fix this problem. Are there other places where VirtualKeyBoard is used where this is also an issue, apart from the Rename function in the media selection list (MovieSelection)?

  4. prl

    As far as I can see, the issue that IanSav raises is unrelated to the issues with VirtualKeyBoard in the bug report. It is due to the quite different ways that the evtPaint code in eLabel::event() displays text that doesn't have a marked position (or has all positions marked) and how it displays text when a single character's text position is marked. The former is used when no button has been pressed since the start of the NumericalTextInputHelpDialog or when the last character entered was finalised, and the latter is used when in a sequence of presses of the same numeric key to indicate where in the character selection list the user has reached.

    I don't think there's a simple fix. It may be doable by adding an "invert video" escape code to eTextPara::renderString() and adding in the appropriate escapes when eLabel::event() calls eTextPara::renderString().

    It should have a separate report in the issue tracker so that it doesn't fade from memory when this bug is addressed.

  5. Peter Urbanec reporter

    Set the marked position during render

    The marked position (inverted glyph) of a component is used as a cursor. Marked labels were drawn differently to normal text, losing the wrap and vertical alignment flags (e.g. the SMS help text would shift and the cursor would not wrap on the longer "0" line). When the text was wider than the widget the cursor (and text) was not visible. Handle the marked position directly in renderText and renderString, realigning the text to ensure the marked position is visible. There's a new option "Settings -> GUI settings -> Input scroll position" to choose how the alignment will work. The value is a percentage of the width, which will be offset from each side. The default is 0, so it scrolls at the edges; 50 will scroll in the middle.

    Explicitly turn off wrapping for Input (since it's no longer done implicitly by the above; avoids adding noWrap=1 to skins).

    Border and marking don't work well together, so disable the border when the marked position is set.

    Resolves #317.

    → <<cset 5c3ade24ddfd>>

  6. Log in to comment