In some ways, this is unrelated, but I had to combine this anyhow:
* Extend the PaneSwitch BControl from Tracker, so it can draw on/off labels. This has the added benefit that you can click the label to expand/collapse, like for example in the Get Info window (Permissions). * I also added font-sensitivity features to PaneSwitch, and it can be used in layouted windows (untested). * This made the "DrawButton" in the Installer superfluous. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30348 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -946,22 +946,11 @@ AttributeView::AttributeView(BRect rect, Model *model)
|
||||
|
||||
fPermissionsSwitch = new PaneSwitch(BRect(), "Permissions");
|
||||
fPermissionsSwitch->SetMessage(new BMessage(kPermissionsSelected));
|
||||
fPermissionsSwitch->SetLabels(NULL, "Permissions");
|
||||
AddChild(fPermissionsSwitch);
|
||||
|
||||
BStringView *stringView = new BStringView(BRect(), "Permissions", "Permissions");
|
||||
|
||||
AddChild(stringView);
|
||||
|
||||
stringView->ResizeToPreferred();
|
||||
|
||||
BRect bounds = Bounds(), stringViewBounds = stringView->Bounds();
|
||||
fPermissionsSwitch->MoveTo(kBorderWidth + 3, bounds.bottom - stringViewBounds.bottom +
|
||||
(stringViewBounds.bottom - 11) / 2);
|
||||
|
||||
stringView->MoveTo(kBorderWidth + 11 + 3, bounds.bottom -
|
||||
stringViewBounds.bottom);
|
||||
|
||||
fPermissionsSwitch->ResizeTo(10, 11);
|
||||
fPermissionsSwitch->ResizeToPreferred();
|
||||
fPermissionsSwitch->MoveTo(kBorderWidth + 3,
|
||||
Bounds().bottom - 3 - fPermissionsSwitch->Bounds().Height());
|
||||
|
||||
InitStrings(model);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user