Preferences: improve layout.
* Sounds use LayoutBuilder vs. GroupLayoutBuilder. * Time standard spacing. * VirtualMemory standard spacing.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#include <ControlLook.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <fs_attr.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
#include <LayoutBuilder.h>
|
||||
#include <Locale.h>
|
||||
#include <MediaFiles.h>
|
||||
#include <MenuBar.h>
|
||||
@@ -312,21 +312,16 @@ HWindow::_InitGUI()
|
||||
playbutton->SetEnabled(false);
|
||||
playbutton->SetExplicitSize(buttonsSize);
|
||||
|
||||
const float kInset = be_control_look->DefaultItemSpacing();
|
||||
|
||||
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||
AddChild(BGroupLayoutBuilder(B_VERTICAL)
|
||||
.SetInsets(kInset, kInset, kInset, kInset)
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(fEventList)
|
||||
.AddGroup(B_HORIZONTAL)
|
||||
.SetInsets(0, 0, 0, 0)
|
||||
.Add(menuField)
|
||||
.AddGroup(B_HORIZONTAL, 0)
|
||||
.Add(playbutton)
|
||||
.Add(stopbutton)
|
||||
.End()
|
||||
.End()
|
||||
);
|
||||
.End();
|
||||
|
||||
// setup file menu
|
||||
_SetupMenuField();
|
||||
|
||||
@@ -139,11 +139,10 @@ TTimeWindow::_InitWindow()
|
||||
fRevertButton->SetExplicitAlignment(
|
||||
BAlignment(B_ALIGN_LEFT, B_ALIGN_MIDDLE));
|
||||
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_DEFAULT_SPACING)
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(fBaseView)
|
||||
.Add(fRevertButton)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
|
||||
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING);
|
||||
.Add(fRevertButton);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -196,13 +196,13 @@ SettingsWindow::SettingsWindow()
|
||||
BBox* box = new BBox("box");
|
||||
box->SetLabel(fSwapEnabledCheckBox);
|
||||
|
||||
box->AddChild(BLayoutBuilder::Group<>(B_VERTICAL, B_USE_DEFAULT_SPACING)
|
||||
box->AddChild(BLayoutBuilder::Group<>(B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(fSwapUsageBar)
|
||||
.Add(fSwapAutomaticCheckBox)
|
||||
.Add(fVolumeMenuField)
|
||||
.Add(fSizeSlider)
|
||||
.Add(fWarningStringView)
|
||||
.SetInsets(10)
|
||||
.View());
|
||||
|
||||
fDefaultsButton = new BButton("defaults", B_TRANSLATE("Defaults"),
|
||||
@@ -212,14 +212,14 @@ SettingsWindow::SettingsWindow()
|
||||
new BMessage(kMsgRevert));
|
||||
fRevertButton->SetEnabled(false);
|
||||
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_DEFAULT_SPACING)
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(box)
|
||||
.AddGroup(B_HORIZONTAL, 10)
|
||||
.AddGroup(B_HORIZONTAL)
|
||||
.Add(fDefaultsButton)
|
||||
.Add(fRevertButton)
|
||||
.AddGlue()
|
||||
.End()
|
||||
.SetInsets(10);
|
||||
.End();
|
||||
|
||||
BScreen screen;
|
||||
BRect screenFrame = screen.Frame();
|
||||
|
||||
Reference in New Issue
Block a user