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