Expander: Smarter window sizing
* When using the "Show Content" feature, enlarge the window horizontally rather than wrapping. Ref: enhancement request #3797. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33073 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8a0ea31a5a
commit
80c5515366
@ -361,8 +361,16 @@ ExpanderWindow::MessageReceived(BMessage *msg)
|
||||
if (!fExpandingStarted && fListingStarted) {
|
||||
BString string;
|
||||
int32 i = 0;
|
||||
while (msg->FindString("output", i++, &string) == B_OK)
|
||||
while (msg->FindString("output", i++, &string) == B_OK) {
|
||||
// expand the window if we need...
|
||||
float delta = fListingText->StringWidth(string.String())
|
||||
- fListingText->Frame().Width();
|
||||
if (delta > 0) {
|
||||
ResizeTo(Frame().Width() + delta,
|
||||
Frame().Height());
|
||||
}
|
||||
fListingText->Insert(string.String());
|
||||
}
|
||||
fListingText->ScrollToSelection();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user