From 8aafdd05fc4dd270c096eb432135b818cca86163 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 9 Dec 2008 05:37:35 +0000 Subject: [PATCH] Make the uptime view a multiline textview. This allows it to gracefully wrap the text instead of simply cutting it off when your uptime is too long to fit into the provided space. Fixes ticket #701. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28786 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/aboutsystem/AboutSystem.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/apps/aboutsystem/AboutSystem.cpp b/src/apps/aboutsystem/AboutSystem.cpp index fa6c699e28..44af8c5e29 100644 --- a/src/apps/aboutsystem/AboutSystem.cpp +++ b/src/apps/aboutsystem/AboutSystem.cpp @@ -100,7 +100,7 @@ class AboutView : public BView { void _AddCopyrightsFromAttribute(); BStringView *fMemView; - BStringView *fUptimeView; + BTextView *fUptimeView; BView *fInfoView; HyperTextView *fCreditsView; @@ -333,9 +333,13 @@ AboutView::AboutView(const BRect &rect) stringView->ResizeToPreferred(); r.OffsetBy(0, labelHeight); - r.bottom = r.top + textHeight; + r.bottom = r.top + textHeight * 3; - fUptimeView = new BStringView(r, "uptimetext", ""); + fUptimeView = new BTextView(r, "uptimetext", r.OffsetToCopy(0,0), B_FOLLOW_ALL); + fUptimeView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + fUptimeView->MakeEditable(false); + fUptimeView->MakeSelectable(false); + fUptimeView->SetWordWrap(true); fInfoView->AddChild(fUptimeView); // string width changes, so we don't do ResizeToPreferred()