#7560 closed bug (fixed)
BTextView does not properly handle wrapped lines
Reported by: | humdinger | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | yourpalal | |
Blocked By: | Blocking: | #11723, #12143, #12719, #12908, #13479 | |
Platform: | All |
Description
This is hrev41650 pre-alpha3.
When you invoke the TeamMonitor (CTRL+ALT+DEL) for the first time, and click on an entry in the list of teams, the scroll view height increases with a nice little jump.
Attachments (1)
Change History (19)
comment:1 by , 14 years ago
comment:3 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
Taking ownership since I've been working on Team Monitor lately.
comment:4 by , 11 years ago
Cc: | removed |
---|
comment:5 by , 10 years ago
hrev41250 seems to be a likely candidate. It introduces the AllShowingTextView which sets its min size when FrameResized is called.
I see two possible problems with this:
- The size could be set earlier, as soon as SetText is called. This may avoid a resize > set min size > try to resize again path, but more important is that the text can be changed at any time, and there is no guarantee that FrameResized will be called after it does.
- Only the minimal size is set, and that doesn't prevent the view from growing bigger than it. As a result, the bottom part of the window, which is a BCardLayout, is resized only when the other view added to it (the one with the app icon and name) is shown, this one fully constraints the view size and fixes the layout.
by , 10 years ago
Attachment: | teammonitor.png added |
---|
comment:8 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | reopened → assigned |
comment:9 by , 10 years ago
Blocking: | 11723 added |
---|
comment:10 by , 10 years ago
Team monitor window still looks the same as shown above in latest build hrev49000.
comment:12 by , 9 years ago
Blocking: | 12719 added |
---|
comment:13 by , 8 years ago
Component: | Servers/input_server → Kits/Interface Kit |
---|---|
Summary: | TeamMonitor's scroll view grows on first click → BTextView does not properly handle wrapped lines |
It's actually a BTextView layout bug: try resizing the window horizontally, you'll see that the BTextView will grow horizontally and collapse vertically, and then the buttons will be fully visible.
comment:14 by , 8 years ago
Blocking: | 12908 added |
---|
comment:15 by , 8 years ago
Blocking: | 13479 added |
---|
(In #13479) Thanks for the ticket, but as discussed at the forums, the issue is already tracked with #7560.
comment:16 by , 8 years ago
It's not a BTextView
bug, it's an API inconvenience, you'll have to call BWindow::ResizeToPreferred()
.
However, when I add this (to BootPromptWindow.cpp, line 259), the window size is only sometimes correct, but mostly way too large. I haven't had the time to investigate, but this is definitely a bug somewhere (and that might even be located in BTextView
, after all).
comment:17 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed TeamMonitor in hrev51582 by setting various explicit constraints to not get a too small window. Also made similar changes to FirstBootPrompt
In both cases the issue is similar: nothing forces the window to be very wide, so ResizeToPreferred ends up asking the BTextView a HeightForWidth for a very small width (52px in my case). This causes the text view to lay out one word per line and return a very large height.
By constraining the window width to a sane minimal size, we can avoid the problem. So I now agree with Axel, there isn't really a bug here and we just need to be more careful with the way we lay things out in windows.
Layout is wrong until you select any process. I think it got broken during TeamMonitor localization.