Changed the ConvertLine() method to produce almost exactly the same

output as the original DiskProbe.
fFontSize and fAscent are now automatically maintained when the font
size is changed. Rendering improved (spacing and location).
The maximum window size is now set to contain the whole data view.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6569 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-02-12 04:21:33 +00:00
parent bc005359f2
commit 90828ad15d
5 changed files with 80 additions and 11 deletions
+16 -2
View File
@@ -361,9 +361,9 @@ ProbeView::ProbeView(BRect rect, entry_ref *ref, const char *attribute)
rect.top = rect.bottom + 3;
rect.bottom = Bounds().bottom - B_H_SCROLL_BAR_HEIGHT;
rect.right -= B_V_SCROLL_BAR_WIDTH;
BView *view = new DataView(rect, fEditor);
fDataView = new DataView(rect, fEditor);
fScrollView = new BScrollView("scroller", view, B_FOLLOW_ALL, B_WILL_DRAW, true, true);
fScrollView = new BScrollView("scroller", fDataView, B_FOLLOW_ALL, B_WILL_DRAW, true, true);
AddChild(fScrollView);
}
@@ -373,6 +373,20 @@ ProbeView::~ProbeView()
}
void
ProbeView::UpdateSizeLimits()
{
if (Window() == NULL)
return;
float width, height;
fDataView->GetPreferredSize(&width, &height);
Window()->SetSizeLimits(200, width + B_V_SCROLL_BAR_WIDTH,
200, height + fHeaderView->Frame().bottom + 1 + B_H_SCROLL_BAR_HEIGHT + Frame().top);
}
void
ProbeView::DetachedFromWindow()
{