#13796 closed bug (fixed)
[TextControl] Text don't align when typing or removing
Reported by: | hyche | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta3 |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
How to reproduce:
- Create a new TextControl object
- Set alignment of text to B_ALIGN_RIGHT or B_ALIGN_CENTER
- Type and see
Attachments (4)
Change History (19)
by , 7 years ago
Attachment: | align-text-when-changing.patch added |
---|
comment:1 by , 7 years ago
patch: | 0 → 1 |
---|
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
by , 7 years ago
Attachment: | 0001-TextView-Reimplement-the-behavior-of-ScrollToOffset.patch added |
---|
by , 7 years ago
Attachment: | 0002-TextInput-Fix-text-alignment-when-typing-or-removing.patch added |
---|
comment:3 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Sorry for reopening this, the old patch not scroll text when it grows more than the bounding box. Also the first of new patch may causes some applications misbehave..
follow-up: 5 comment:4 by , 7 years ago
Noticable in hrev51624 (and a few earlier) in one-line text input boxes: you can type past the visible end. Previously (and in BeOS) it always scrolled the text to keep the cursor visible, now text doesn't move. Try the FileTypes preference, or BeShare chat.
comment:5 by , 7 years ago
Replying to Alexander G. M. Smith:
Noticable in hrev51624 (and a few earlier) in one-line text input boxes: you can type past the visible end. Previously (and in BeOS) it always scrolled the text to keep the cursor visible, now text doesn't move.
New patches above fixes this issue. It also fixes when removing text that past the bounding view, the cursor is not visible. But someone should review the patches and merge. As I mentioned earlier in the first of new patches, the new fix changed the behavior of function ScrollToOffset.
follow-up: 8 comment:6 by , 7 years ago
There's almost always something extra that needs fixing after a change. And details that need thinking about. Should the text be centered/right/left justified when the text input is not active, but scroll to show the cursor when it becomes active? Could even animate that scrolling. But then the user would have trouble clicking on a particular character, if that also activates the text box and starts it scrolling. So best to always keep the cursor visible.
BeOS justifies the text if it fits, and overrides that if the cursor is off screen. It's kind of weird for centered text, always keeping the cursor visible but also centering it around the original cursor position where it last did a jump scroll to move the cursor back on screen. Let me know if you need a video of that. Though if you fix it, you don't have to duplicate that behavior, just need something reasonable for the user.
comment:7 by , 7 years ago
Patches look ok (from my limited knowledge - we should really consider a test suite). Will merge in the evening if no one did it during the day.
comment:8 by , 7 years ago
Replying to Alexander G. M. Smith:
Let me know if you need a video of that. Though if you fix it, you don't have to duplicate that behavior, just need something reasonable for the user.
Yes please, I really need it. I am preparing a video demonstrates new behavior of TextView, but somehow the BeScreenRecorder doesn't work.
Replying to Pulkomandy:
Patches look ok (from my limited knowledge - we should really consider a test suite). Will merge in the evening if no one did it during the day.
I will make new patch, because there is a new issue when the cursor is offscreen and then if the window resizes then use leftarrow key back to text beginning, the text not align anymore. I am busy at school work right now, maybe tomorrow patch will be submitted.
comment:9 by , 7 years ago
Tried to make a video using VirtualBox's video capture. It sort of works for a few seconds, then the video file goes corrupt (tried several times, also under Windows and Linux host OS). I'll try a camera and make a video of the real screen tomorrow.
by , 7 years ago
Attachment: | BeOSTextInputJustificationExamples.mp4 added |
---|
Video of inserting and deleting text in BeOS text input boxes, with right, left, center alignments. Note how scrolling is minimized and it jumps to center when needed.
comment:11 by , 7 years ago
patch: | 1 → 0 |
---|
comment:13 by , 4 years ago
Milestone: | R1 → R1/beta3 |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Fixed in hrev54496.
Applied in hrev51611. Thanks!