Layout API changes. Tested on Haiku r39074, I really don't know what is the first revision with this changes.

This commit is contained in:
plfiorini 2010-10-24 06:27:09 +00:00
parent f8304f0c27
commit c0a63c8f26
5 changed files with 9 additions and 15 deletions

View File

@ -9,8 +9,7 @@
#include <Alert.h>
#include <Button.h>
#include <ControlLook.h>
#include <GroupLayout.h>
#include <GroupLayoutBuilder.h>
#include <LayoutBuilder.h>
#include <TextControl.h>
#include <String.h>
@ -51,9 +50,7 @@ AccountDialog::AccountDialog(const char* title, ProtocolSettings* settings,
BButton* ok = new BButton("OK", new BMessage(kOK));
const float spacing = be_control_look->DefaultItemSpacing();
SetLayout(new BGroupLayout(B_VERTICAL, spacing));
AddChild(BGroupLayoutBuilder(B_VERTICAL, spacing)
BLayoutBuilder::Group<>(this, B_VERTICAL)
.Add(fAccountName)
.Add(divider)
.Add(fTop)
@ -63,8 +60,7 @@ AccountDialog::AccountDialog(const char* title, ProtocolSettings* settings,
.Add(ok)
.End()
.AddGlue()
.SetInsets(spacing, spacing, spacing, 0)
);
.SetInsets(spacing, spacing, spacing, 0);
fAccountName->MakeFocus(true);

View File

@ -70,6 +70,7 @@ PreferencesBehavior::PreferencesBehavior()
.Add(fIgnoreEmoticons)
.AddGlue()
.SetInsets(spacing, spacing, spacing, spacing)
.TopView()
);
}

View File

@ -8,8 +8,7 @@
#include <Button.h>
#include <ControlLook.h>
#include <GroupLayout.h>
#include <GroupLayoutBuilder.h>
#include <LayoutBuilder.h>
#include <TabView.h>
#include "PreferencesDialog.h"
@ -30,18 +29,14 @@ PreferencesDialog::PreferencesDialog()
BButton* ok = new BButton("OK", new BMessage(kApply));
const float spacing = be_control_look->DefaultItemSpacing();
SetLayout(new BGroupLayout(B_VERTICAL,
be_control_look->DefaultItemSpacing()));
AddChild(BGroupLayoutBuilder(B_VERTICAL)
BLayoutBuilder::Group<>(this, B_VERTICAL)
.Add(tabView)
.AddGroup(B_HORIZONTAL)
.AddGlue()
.Add(ok)
.SetInsets(spacing, spacing, 0, 0)
.End()
.SetInsets(spacing, spacing, spacing, spacing)
);
.SetInsets(spacing, spacing, spacing, spacing);
CenterOnScreen();
}

View File

@ -49,6 +49,7 @@ ContactPopUp::ContactPopUp(ContactLinker* contact)
.End()
.Add(fAvatarView)
.SetInsets(10, 10, 10, 10)
.TopView()
);
}

View File

@ -76,6 +76,7 @@ StatusView::StatusView(const char* name)
.AddGlue()
.End()
.Add(fAvatar)
.TopView()
);
}