Use B_USE_WINDOW_SPACING

Use B_USE_WINDOW_SPACING as inset from contents to window border.
Some whitespace cleanup.
This commit is contained in:
Humdinger 2015-11-07 16:37:05 +01:00
parent d5607aa971
commit d0ac609964
43 changed files with 125 additions and 121 deletions

View File

@ -64,7 +64,7 @@ ActivityWindow::ActivityWindow()
fLayout = new BGroupLayout(B_VERTICAL);
float inset = ceilf(be_plain_font->Size() * 0.7);
fLayout->SetInsets(inset, inset, inset, inset);
fLayout->SetInsets(B_USE_WINDOW_SPACING);
fLayout->SetSpacing(inset);
BView* top = new BView("top", 0, fLayout);

View File

@ -118,8 +118,8 @@ void
WizardView::_BuildUI()
{
fPageContainer = new BGroupView("page container");
fPageContainer->GroupLayout()->SetInsets(B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING);
fPageContainer->GroupLayout()->SetInsets(B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING);
fPrevious = new BButton("previous",
B_TRANSLATE_COMMENT("Previous", "Button"),
new BMessage(kMessagePrevious));
@ -132,8 +132,8 @@ WizardView::_BuildUI()
.Add(fPageContainer)
.Add(new BSeparatorView(B_HORIZONTAL))
.AddGroup(B_HORIZONTAL)
.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING,
B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING)
.Add(quit)
.AddGlue()
.Add(fPrevious)

View File

@ -228,11 +228,10 @@ CharacterWindow::CharacterWindow()
fCharacterView->SetExplicitMinSize(BSize(viewFont.StringWidth("w") * 40,
B_SIZE_UNSET));
BLayoutBuilder::Group<>(this, B_VERTICAL)
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.Add(menuBar)
.AddGroup(B_HORIZONTAL)
.SetInsets(B_USE_DEFAULT_SPACING, 0, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.AddGroup(B_VERTICAL)
.AddGroup(B_HORIZONTAL)
.Add(fFilterControl)

View File

@ -617,7 +617,7 @@ VideoWindow::_BuildCaptureControls()
fCaptureSetupBox = new BBox("Capture Controls", B_WILL_DRAW);
fCaptureSetupBox->SetLabel(B_TRANSLATE("Capture controls"));
BGridLayout *controlsLayout = new BGridLayout(kXBuffer, 0);
BGridLayout *controlsLayout = new BGridLayout(B_USE_DEFAULT_SPACING, 0);
controlsLayout->SetInsets(10, 15, 5, 5);
fCaptureSetupBox->SetLayout(controlsLayout);
@ -680,7 +680,7 @@ VideoWindow::_BuildCaptureControls()
fUploadClientSelector->SetLabel(B_TRANSLATE("Type:"));
BGridLayout *ftpLayout = new BGridLayout(kXBuffer, 0);
BGridLayout *ftpLayout = new BGridLayout(B_USE_DEFAULT_SPACING, 0);
ftpLayout->SetInsets(10, 15, 5, 5);
fFtpSetupBox->SetLayout(ftpLayout);
@ -837,10 +837,10 @@ VideoWindow::ToggleMenuOnOff()
{
BMenuItem* item = fMenu->FindItem(msg_video);
item->SetEnabled(!item->IsEnabled());
item = fMenu->FindItem(msg_start);
item->SetEnabled(!item->IsEnabled());
item = fMenu->FindItem(msg_stop);
item->SetEnabled(!item->IsEnabled());
}

View File

@ -160,8 +160,7 @@ PreferencesWindow::PreferencesWindow(BRect frame)
.AddGlue()
.Add(BSpaceLayoutItem::CreateVerticalStrut(B_USE_SMALL_SPACING))
.Add(fAppsIconSizeSlider)
.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_DEFAULT_SPACING)
.End()
.View());
@ -187,8 +186,7 @@ PreferencesWindow::PreferencesWindow(BRect frame)
.Add(new BButton(B_TRANSLATE("Edit in Tracker"
B_UTF8_ELLIPSIS), new BMessage(kEditInTracker)))
.AddGlue()
.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_DEFAULT_SPACING)
.End()
.View());
@ -202,8 +200,7 @@ PreferencesWindow::PreferencesWindow(BRect frame)
.Add(fWindowAutoRaise)
.Add(fWindowAutoHide)
.AddGlue()
.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_DEFAULT_SPACING)
.End()
.View());
@ -228,7 +225,7 @@ PreferencesWindow::PreferencesWindow(BRect frame)
.Add(fRevertButton)
.AddGlue()
.End()
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.End();
BMessage windowSettings;

View File

@ -95,7 +95,7 @@ DevicesView::CreateLayout()
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.Add(menuBar)
.AddSplit(B_HORIZONTAL)
.SetInsets(B_USE_ITEM_INSETS)
.SetInsets(B_USE_WINDOW_SPACING)
.AddGroup(B_VERTICAL)
.Add(fOrderByMenu, 1)
.Add(scrollView, 2)

View File

@ -57,7 +57,7 @@ OpenWindow::OpenWindow()
new BMessage(B_QUIT_REQUESTED));
BLayoutBuilder::Group<>(this, B_VERTICAL)
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(field)
.AddGroup(B_HORIZONTAL)
.Add(cancelButton)

View File

@ -481,7 +481,8 @@ HeaderView::HeaderView(const entry_ref *ref, DataEditor &editor)
fLastPosition(0)
{
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
GridLayout()->SetInsets(B_USE_SMALL_SPACING);
GridLayout()->SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING);
fIconView = new IconView(ref, editor.IsDevice());
GridLayout()->AddView(fIconView, 0, 0, 1, 2);

View File

@ -1173,7 +1173,7 @@ MessageView::SetTo(BMessage& message)
fTextView->SetText("");
char text[512];
snprintf(text, sizeof(text), B_TRANSLATE_COMMENT("what: '%.4s'\n\n",
snprintf(text, sizeof(text), B_TRANSLATE_COMMENT("what: '%.4s'\n\n",
"'What' is a message specifier that defines the type of the message."),
(char*)&message.what);
fTextView->Insert(text);

View File

@ -35,7 +35,7 @@ MainWindow::MainWindow(BRect pieRect)
AddChild(BLayoutBuilder::Group<>(B_VERTICAL)
.Add(fControlsView)
.SetInsets(0, B_USE_WINDOW_INSETS, 0, 0)
.SetInsets(0, B_USE_WINDOW_SPACING, 0, 0)
);
float maxHeight = BScreen(this).Frame().Height() - 12;
fControlsView->SetExplicitMaxSize(BSize(maxHeight, maxHeight));

View File

@ -80,9 +80,9 @@ ExpanderWindow::ExpanderWindow(BRect frame, const entry_ref* ref,
size.width = std::max(size.width, fSourceButton->PreferredSize().width);
size.width = std::max(size.width, fExpandButton->PreferredSize().width);
fDestButton->SetExplicitMaxSize(size);
fSourceButton->SetExplicitMaxSize(size);
fExpandButton->SetExplicitMaxSize(size);
fDestButton->SetExplicitSize(size);
fSourceButton->SetExplicitSize(size);
fExpandButton->SetExplicitSize(size);
fListingText = new BTextView("listingText");
fListingText->SetText("");

View File

@ -142,10 +142,10 @@ EULAWindow::EULAWindow()
if (!be_roster->IsRunning(kTrackerSignature))
SetWorkspaces(B_ALL_WORKSPACES);
BLayoutBuilder::Group<>(this, B_VERTICAL, 10)
.SetInsets(10)
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(scrollView)
.AddGroup(B_HORIZONTAL, 10)
.AddGroup(B_HORIZONTAL, B_USE_ITEM_SPACING)
.AddGlue()
.Add(cancelButton)
.Add(continueButton);

View File

@ -173,7 +173,7 @@ InstallerWindow::InstallerWindow()
fStatusView = new BTextView("statusView", be_plain_font, NULL,
B_WILL_DRAW);
fStatusView->SetInsets(10, 10, 10, 10);
fStatusView->SetInsets(10, 0, 10, 0);
fStatusView->MakeEditable(false);
fStatusView->MakeSelectable(false);
@ -249,15 +249,13 @@ InstallerWindow::InstallerWindow()
toolsMenu->AddItem(fMakeBootableItem);
mainMenu->AddItem(toolsMenu);
float spacing = be_control_look->DefaultItemSpacing();
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.Add(mainMenu)
.Add(logoGroup)
.Add(new BSeparatorView(B_HORIZONTAL, B_PLAIN_BORDER))
.AddGroup(B_VERTICAL, spacing)
.SetInsets(spacing)
.AddGrid(new BGridView(0.0f, spacing))
.AddGroup(B_VERTICAL, B_USE_ITEM_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.AddGrid(new BGridView(B_USE_ITEM_SPACING, B_USE_ITEM_SPACING))
.Add(fSrcMenuField->CreateLabelLayoutItem(), 0, 0)
.Add(fSrcMenuField->CreateMenuBarLayoutItem(), 1, 0)
.Add(fDestMenuField->CreateLabelLayoutItem(), 0, 1)
@ -271,7 +269,7 @@ InstallerWindow::InstallerWindow()
.Add(fSizeView, 0, 6, 2)
.End()
.AddGroup(B_HORIZONTAL, spacing)
.AddGroup(B_HORIZONTAL, B_USE_WINDOW_SPACING)
.Add(fLaunchDriveSetupButton)
.AddGlue()
.Add(fBeginButton);

View File

@ -161,7 +161,7 @@ MediaConverterWindow::MediaConverterWindow(BRect frame)
{
BPath outputDir;
if (find_directory(B_USER_DIRECTORY, &outputDir) != B_OK)
outputDir.SetTo("/boot/home");
outputDir.SetTo("/boot/home");
fOutputDir.SetTo(outputDir.Path());
fMenuBar = new BMenuBar("menubar");

View File

@ -140,7 +140,8 @@ SettingsWindow::SettingsWindow(BRect frame)
BGroupLayout* playGroup;
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.AddGroup(settingsLayout)
.SetInsets(kSpacing, kSpacing, kSpacing * 2, 0)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING)
.Add(playModeLabel)
.AddGroup(B_HORIZONTAL, 0)
.GetLayout(&playGroup)
@ -186,7 +187,8 @@ SettingsWindow::SettingsWindow(BRect frame)
.AddStrut(kSpacing)
.End()
.AddGroup(buttonLayout)
.SetInsets(kSpacing)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING,
B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING)
.Add(fRevertB)
.AddGlue()
.Add(cancelButton)

View File

@ -60,13 +60,10 @@ PersonView::PersonView(const char* name, const char* categoryAttribute,
if (fRef != NULL)
file = new BFile(fRef, B_READ_ONLY);
float spacing = be_control_look->DefaultItemSpacing();
BGridLayout* layout = GridLayout();
layout->SetInsets(spacing, spacing, spacing, spacing);
// Add picture "field", using ID photo 35mm x 45mm ratio
fPictureView = new PictureView(70, 90, ref);
BGridLayout* layout = GridLayout();
layout->AddView(fPictureView, 0, 0, 1, 5);
layout->ItemAt(0, 0)->SetExplicitAlignment(
BAlignment(B_ALIGN_CENTER, B_ALIGN_TOP));
@ -353,7 +350,7 @@ PersonView::SetAttribute(const char* attribute, bool update)
{
char* value = NULL;
attr_info info;
BFile* file = NULL;
BFile* file = NULL;
if (fRef != NULL)
file = new(std::nothrow) BFile(fRef, B_READ_ONLY);

View File

@ -108,9 +108,11 @@ PersonWindow::PersonWindow(BRect frame, const char* title,
fView = new PersonView("PeopleView", categoryAttribute, fRef);
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.SetInsets(0, 0, 0, 0)
.Add(menuBar)
.Add(fView);
.AddGroup(B_VERTICAL, 0)
.Add(fView)
.SetInsets(B_USE_WINDOW_SPACING)
.End();
fRevert->SetTarget(fView);
selectAllItem->SetTarget(fView);

View File

@ -37,7 +37,7 @@ PoorManAdvancedView::PoorManAdvancedView(const char* name)
// labels below the slider 1 and 200
fMaxConnections->SetLimitLabels("1", "200");
SetMaxSimutaneousConnections(win->MaxConnections());
BGroupLayout* connectionOptionsLayout = new BGroupLayout(B_VERTICAL, 0);
connectionOptions->SetLayout(connectionOptionsLayout);
@ -49,7 +49,8 @@ PoorManAdvancedView::PoorManAdvancedView(const char* name)
.Add(fMaxConnections)
.End()
.AddGlue()
.SetInsets(B_USE_ITEM_INSETS);
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING);
}
void

View File

@ -4,7 +4,7 @@
* Started: 5/12/2004
* Version: 0.1
*/
#include <Box.h>
#include <Catalog.h>
#include <LayoutBuilder.h>
@ -26,31 +26,31 @@ PoorManLoggingView::PoorManLoggingView(const char* name)
{
PoorManWindow* win;
win = ((PoorManApplication*)be_app)->GetPoorManWindow();
BBox* consoleLogging = new BBox(B_TRANSLATE("Console Logging"));
consoleLogging->SetLabel(STR_BBX_CONSOLE_LOGGING);
// File Logging BBox
BBox* fileLogging = new BBox(B_TRANSLATE("File Logging"));
fileLogging->SetLabel(STR_BBX_FILE_LOGGING);
// Console Logging
fLogConsole = new BCheckBox(B_TRANSLATE("Log To Console"),
STR_CBX_LOG_CONSOLE, new BMessage(MSG_PREF_LOG_CBX_CONSOLE));
// set the checkbox to the value the program has
SetLogConsoleValue(win->LogConsoleFlag());
// File Logging
fLogFile = new BCheckBox(B_TRANSLATE("Log To File"), STR_CBX_LOG_FILE,
new BMessage(MSG_PREF_LOG_CBX_FILE));
// set the checkbox to the value the program has
SetLogFileValue(win->LogFileFlag());
// File Name
fLogFileName = new BTextControl(B_TRANSLATE("File Name"),
STR_TXT_LOG_FILE_NAME, NULL, NULL);
SetLogFileName(win->LogPath());
// Create Log File
fCreateLogFile = new BButton(B_TRANSLATE("Create Log File"),
STR_BTN_CREATE_LOG_FILE, new BMessage(MSG_PREF_LOG_BTN_CREATE_FILE));
@ -63,7 +63,8 @@ PoorManLoggingView::PoorManLoggingView(const char* name)
fileLogging->SetLayout(fileLoggingLayout);
BLayoutBuilder::Group<>(this, B_VERTICAL)
.SetInsets(B_USE_ITEM_INSETS)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING)
.AddGroup(consoleLoggingLayout)
.SetInsets(B_USE_ITEM_INSETS)
.AddGroup(B_HORIZONTAL)

View File

@ -103,7 +103,7 @@ PoorManPreferencesWindow::MessageReceived(BMessage* message)
PoorManServer* server;
win = ((PoorManApplication*)be_app)->GetPoorManWindow();
server = win->GetServer();
PRINT(("Pref Window: sendDir CheckBox: %d\n",
fSiteView->SendDirValue()));
server->SetListDir(fSiteView->SendDirValue());
@ -118,7 +118,7 @@ PoorManPreferencesWindow::MessageReceived(BMessage* message)
win->SetDirLabel(fSiteView->WebDir());
}
PRINT(("Pref Window: logConsole CheckBox: %d\n",
PRINT(("Pref Window: logConsole CheckBox: %d\n",
fLoggingView->LogConsoleValue()));
win->SetLogConsoleFlag(fLoggingView->LogConsoleValue());
PRINT(("Pref Window: logFile CheckBox: %d\n",
@ -127,13 +127,13 @@ PoorManPreferencesWindow::MessageReceived(BMessage* message)
PRINT(("Pref Window: logFileName: %s\n",
fLoggingView->LogFileName()));
win->SetLogPath(fLoggingView->LogFileName());
PRINT(("Pref Window: MaxConnections Slider: %" B_PRId32 "\n",
fAdvancedView->MaxSimultaneousConnections()));
server->SetMaxConns(fAdvancedView->MaxSimultaneousConnections());
win->SetMaxConnections(
(int16)fAdvancedView->MaxSimultaneousConnections());
if (Lock())
Quit();
break;
@ -190,7 +190,7 @@ PoorManPreferencesWindow::SelectWebDir(BMessage* message)
PRINT(("DIR: %s\n", path.Path()));
fSiteView->SetWebDir(path.Path());
bool temp;
if (message->FindBool("Default Dialog", &temp) == B_OK) {
PoorManWindow* win = ((PoorManApplication *)be_app)->GetPoorManWindow();
@ -199,7 +199,7 @@ PoorManPreferencesWindow::SelectWebDir(BMessage* message)
win->SetWebDir(fSiteView->WebDir());
win->SetDirLabel(fSiteView->WebDir());
win->SaveSettings();
win->Show();
win->Show();
}
if (Lock())
Quit();

View File

@ -4,7 +4,7 @@
* Started: 5/07/2004
* Version: 0.1
*/
#include <Box.h>
#include <LayoutBuilder.h>
@ -38,24 +38,25 @@ PoorManSiteView::PoorManSiteView(const char* name)
// Web Directory Text Control
fWebDir = new BTextControl(STR_TXT_DIRECTORY, NULL, NULL);
SetWebDir(win->WebDir());
// Select Web Directory Button
fSelectWebDir = new BButton("Select Web Dir", STR_BTN_DIRECTORY,
new BMessage(MSG_PREF_SITE_BTN_SELECT));
// Index File Name Text Control
fIndexFileName = new BTextControl(STR_TXT_INDEX, NULL, NULL);
SetIndexFileName(win->IndexFileName());
BGroupLayout* webSiteLocationLayout = new BGroupLayout(B_VERTICAL, 0);
webSiteLocation->SetLayout(webSiteLocationLayout);
BGroupLayout* webSiteOptionsLayout = new BGroupLayout(B_VERTICAL, 0);
webSiteOptions->SetLayout(webSiteOptionsLayout);
BLayoutBuilder::Group<>(this, B_VERTICAL)
.SetInsets(B_USE_ITEM_INSETS)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING)
.AddGroup(webSiteLocationLayout)
.SetInsets(B_USE_ITEM_INSETS)
.AddGrid(B_USE_SMALL_SPACING, B_USE_SMALL_SPACING)

View File

@ -87,7 +87,7 @@ ScreenshotApp::MessageReceived(BMessage* message)
BApplication::MessageReceived(message);
break;
}
if (status != B_OK)
be_app->PostMessage(B_QUIT_REQUESTED);
}
@ -97,12 +97,12 @@ void
ScreenshotApp::ArgvReceived(int32 argc, char** argv)
{
for (int32 i = 0; i < argc; i++) {
if (strcmp(argv[i], "-s") == 0
if (strcmp(argv[i], "-s") == 0
|| strcmp(argv[i], "--silent") == 0)
fSilent = true;
else if (strcmp(argv[i], "-c") == 0
else if (strcmp(argv[i], "-c") == 0
|| strcmp(argv[i], "--clipboard") == 0)
fClipboard = true;
fClipboard = true;
}
}

View File

@ -200,8 +200,9 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
BBox* previewBox = new BBox(B_FANCY_BORDER, fPreview);
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.SetInsets(kSpacing)
.AddGroup(B_HORIZONTAL, kSpacing)
.AddGroup(B_HORIZONTAL)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING)
.Add(previewBox)
.AddGroup(B_VERTICAL, 0)
.Add(fActiveWindow)

View File

@ -43,7 +43,7 @@ PrefWindow::PrefWindow(const BMessenger& messenger)
BLayoutBuilder::Group<>(this, B_VERTICAL)
.AddGroup(B_VERTICAL)
.SetInsets(10, 10, 10, 10)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(fAppearanceView = new AppearancePrefView(
B_TRANSLATE("Appearance"), fTerminalMessenger))
.AddGroup(B_HORIZONTAL)

View File

@ -547,19 +547,19 @@ GrepWindow::_LayoutViews()
"ScrollSearchResults", fSearchResults,
B_FULL_UPDATE_ON_RESIZE, true, true);
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_HALF_ITEM_SPACING)
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.SetInsets(0, 0, -1, -1)
.Add(fMenuBar)
.AddGrid(B_USE_HALF_ITEM_SPACING)
.SetInsets(B_USE_ITEM_INSETS, B_USE_HALF_ITEM_INSETS,
B_USE_ITEM_INSETS, 0)
.AddGrid(B_USE_HALF_ITEM_INSETS)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING)
.Add(fSearchText, 0, 0, 3)
.Add(fShowLinesCheckbox, 0, 1)
.Add(BSpaceLayoutItem::CreateGlue(), 1, 1)
.Add(fButton, 2, 1)
.End()
.AddGroup(B_VERTICAL, 0)
.SetInsets(-1, 0, -1, -1)
.SetInsets(-2, 0, -1, -1)
.Add(scroller)
.End()
.End();

View File

@ -331,7 +331,7 @@ SettingsWindow::_CreateGeneralPage(float spacing)
new BMessage(MSG_SHOW_HOME_BUTTON_CHANGED));
fShowHomeButton->SetValue(B_CONTROL_ON);
BView* view = BGroupLayoutBuilder(B_VERTICAL, spacing / 2)
BView* view = BGroupLayoutBuilder(B_VERTICAL, 0)
.Add(BGridLayoutBuilder(spacing / 2, spacing / 2)
.Add(fStartPageControl->CreateLabelLayoutItem(), 0, 0)
.Add(fStartPageControl->CreateTextViewLayoutItem(), 1, 0)
@ -355,10 +355,11 @@ SettingsWindow::_CreateGeneralPage(float spacing)
.Add(fAutoHideInterfaceInFullscreenMode)
.Add(fAutoHidePointer)
.Add(fShowHomeButton)
.Add(fDaysInHistory)
.Add(BSpaceLayoutItem::CreateHorizontalStrut(spacing))
.Add(fDaysInHistory)
.SetInsets(spacing, spacing, spacing, spacing)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING)
.TopView()
;
@ -417,7 +418,8 @@ SettingsWindow::_CreateFontsPage(float spacing)
.Add(fFixedSizesMenu->CreateLabelLayoutItem(), 0, 13)
.Add(fFixedSizesMenu->CreateMenuBarLayoutItem(), 1, 13)
.SetInsets(spacing, spacing, spacing, spacing)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING)
.View()
;
@ -473,7 +475,7 @@ SettingsWindow::_CreateProxyPage(float spacing)
fProxyPasswordControl->SetText(
fSettings->GetValue(kSettingsKeyProxyPassword, ""));
BView* view = BGroupLayoutBuilder(B_VERTICAL, spacing / 2)
BView* view = BGroupLayoutBuilder(B_VERTICAL, 0)
.Add(fUseProxyCheckBox)
.Add(BGridLayoutBuilder(spacing / 2, spacing / 2)
.Add(fProxyAddressControl->CreateLabelLayoutItem(), 0, 0)
@ -492,7 +494,8 @@ SettingsWindow::_CreateProxyPage(float spacing)
)
.Add(BSpaceLayoutItem::CreateGlue())
.SetInsets(spacing, spacing, spacing, spacing)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING)
.TopView()
;

View File

@ -866,7 +866,7 @@ FindPanel::FindPanel(BFile* node, FindWindow* parent, bool fromTemplate,
.Add(new BSeparatorView(B_HORIZONTAL, B_PLAIN_BORDER))
.Add(queryControls);
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(queryBox)
.AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING)
.Add(icon)

View File

@ -96,20 +96,20 @@ TrackerSettingsWindow::TrackerSettingsWindow()
fSettingsContainerBox = new BBox("SettingsContainerBox");
const float spacing = be_control_look->DefaultItemSpacing();
// const float spacing = be_control_look->DefaultItemSpacing();
BLayoutBuilder::Group<>(this)
.AddGroup(B_HORIZONTAL, spacing)
.AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING)
.Add(scrollView)
.AddGroup(B_VERTICAL, spacing)
.AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING)
.Add(fSettingsContainerBox)
.AddGroup(B_HORIZONTAL, spacing)
.AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING)
.Add(fDefaultsButton)
.Add(fRevertButton)
.AddGlue()
.End()
.End()
.SetInsets(spacing, spacing, spacing, spacing)
.SetInsets(B_USE_WINDOW_SPACING)
.End();
fSettingsTypeListView->AddItem(new SettingsItem(B_TRANSLATE("Desktop"),

View File

@ -112,7 +112,7 @@ APRWindow::_UpdateButtons()
{
fDefaultsButton->SetEnabled(_IsDefaultable());
fRevertButton->SetEnabled(_IsRevertable());
}
}
bool

View File

@ -231,7 +231,7 @@ DataTranslationsWindow::_SetupViews()
// Build the layout
BLayoutBuilder::Group<>(this, B_HORIZONTAL)
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(scrollView, 3)
.AddGrid(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, 6)
.SetInsets(0, 0, 0, 0)

View File

@ -256,9 +256,10 @@ ApplicationTypesWindow::ApplicationTypesWindow(const BMessage& settings)
.Add(fTrackerButton)
.AddGlue()
.End()
.AddGlue()
.AddGlue(10.0)
.End()
.SetInsets(padding, padding, padding, padding);
.SetInsets(B_USE_WINDOW_SPACING);
BMimeType::StartWatching(this);
_SetType(NULL);

View File

@ -547,7 +547,7 @@ FileTypesWindow::FileTypesWindow(const BMessage& settings)
.SetInsets(0)
.Add(menuBar)
.AddGroup(B_HORIZONTAL, 0)
.SetInsets(padding, padding, padding, padding)
.SetInsets(B_USE_WINDOW_SPACING)
.AddSplit(fMainSplitView)
.AddGroup(B_VERTICAL, padding)
.Add(typeListScrollView)
@ -1194,7 +1194,7 @@ FileTypesWindow::_MoveUpAttributeIndex(int32 index)
// so just ignore this attribute name.
// NOTE: This shows that the attribute description is
// too fragile. It would have been better to pack each
// attribute description into a separate BMessage.
// attribute description into a separate BMessage.
continue;
}
@ -1207,7 +1207,7 @@ FileTypesWindow::_MoveUpAttributeIndex(int32 index)
else if (j == index)
originalIndex = j - 1;
else
originalIndex = j;
originalIndex = j;
attributes.FindData(kAttributeNames[i], type,
originalIndex, &data, &size);
if (j == 0) {

View File

@ -98,11 +98,10 @@ KeymapWindow::KeymapWindow()
new BMessage(kMsgSwitchShortcuts));
// controls pane
BLayoutBuilder::Group<>(this, B_VERTICAL)
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.Add(_CreateMenu())
.AddGroup(B_HORIZONTAL)
.SetInsets(B_USE_DEFAULT_SPACING, 0, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(_CreateMapLists(), 0.25)
.AddGroup(B_VERTICAL)
.Add(fKeyboardLayoutView)
@ -114,12 +113,12 @@ KeymapWindow::KeymapWindow()
.Add(fTextControl)
.AddGlue(0.0)
.AddGroup(B_HORIZONTAL)
.AddGlue()
.Add(fDefaultsButton = new BButton("defaultsButton",
B_TRANSLATE("Defaults"),
new BMessage(kMsgDefaultKeymap)))
.Add(fRevertButton = new BButton("revertButton",
B_TRANSLATE("Revert"), new BMessage(kMsgRevertKeymap)))
.AddGlue()
.End()
.End()
.End()

View File

@ -325,7 +325,7 @@ ModifierKeysWindow::ModifierKeysWindow()
.Add(fRevertButton)
.Add(fOkButton)
.End()
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.End();
_MarkMenuItems();

View File

@ -411,8 +411,7 @@ MediaWindow::_InitWindow()
// Layout all views
BLayoutBuilder::Group<>(this, B_HORIZONTAL)
.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(scrollView, 0.0f)
.AddGroup(B_VERTICAL)
.SetInsets(0, 0, 0, 0)
@ -657,7 +656,7 @@ status_t
MediaWindow::_RestartMediaServices(void* data)
{
MediaWindow* window = (MediaWindow*)data;
shutdown_media_server();
launch_media_server();

View File

@ -136,7 +136,7 @@ NetworkWindow::NetworkWindow()
// Build the layout
BLayoutBuilder::Group<>(this, B_VERTICAL)
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
#if ENABLE_PROFILES
.AddGroup(B_HORIZONTAL, B_USE_SMALL_SPACING)

View File

@ -230,7 +230,7 @@ PrintersWindow::PrintTestPage(PrinterItem* printer)
BMessage* settings = job->Settings();
if (settings == NULL) {
delete job;
delete job;
return;
}
@ -376,7 +376,7 @@ PrintersWindow::_BuildGUI()
.AddGlue();
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(printersBox)
.AddStrut(B_USE_DEFAULT_SPACING)
.Add(fJobsBox);

View File

@ -535,7 +535,7 @@ ScreenWindow::ScreenWindow(ScreenSettings* settings)
.Add(fRevertButton)
.AddGlue()
.End()
.SetInsets(B_USE_DEFAULT_SPACING);
.SetInsets(B_USE_WINDOW_SPACING);
_UpdateControls();
_UpdateMonitor();

View File

@ -349,7 +349,7 @@ FadeView::FadeView(const char* name, ScreenSaverSettings& settings)
fadeNeverText->MakeSelectable(false);
fadeNeverText->SetText(B_TRANSLATE("Don't fade when mouse is here"));
box->AddChild(BLayoutBuilder::Group<>(B_VERTICAL)
box->AddChild(BLayoutBuilder::Group<>(B_VERTICAL, 0)
.SetInsets(B_USE_DEFAULT_SPACING, 0, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING)
.AddGrid(B_USE_DEFAULT_SPACING, B_USE_SMALL_SPACING)
@ -384,7 +384,8 @@ FadeView::FadeView(const char* name, ScreenSaverSettings& settings)
.View());
BLayoutBuilder::Group<>(this, B_HORIZONTAL)
.SetInsets(B_USE_SMALL_SPACING)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, 0)
.Add(box)
.End();
}
@ -555,7 +556,8 @@ ModulesView::ModulesView(const char* name, ScreenSaverSettings& settings)
fSettingsBox->SetLabel(B_TRANSLATE("Screensaver settings"));
BLayoutBuilder::Group<>(this, B_HORIZONTAL)
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, 0)
.AddGroup(B_VERTICAL)
.Add(fPreviewView)
.Add(saversListScrollView)
@ -931,7 +933,7 @@ ScreenSaverWindow::ScreenSaverWindow()
B_ALIGN_USE_FULL_HEIGHT));
topView->SetExplicitMinSize(BSize(fMinWidth, fMinHeight));
BLayoutBuilder::Group<>(topView, B_VERTICAL)
.SetInsets(0, B_USE_SMALL_SPACING, 0, 0)
.SetInsets(0, B_USE_DEFAULT_SPACING, 0, B_USE_WINDOW_SPACING)
.Add(fTabView)
.End();

View File

@ -240,7 +240,7 @@ ShortcutsWindow::ShortcutsWindow()
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.Add(menuBar)
.AddGroup(B_VERTICAL)
.SetInsets(B_USE_WINDOW_INSETS)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(fColumnListView)
.AddGroup(B_HORIZONTAL)
.AddGroup(B_HORIZONTAL)

View File

@ -314,7 +314,7 @@ HWindow::_InitGUI()
playbutton->SetExplicitSize(buttonsSize);
BLayoutBuilder::Group<>(this, B_VERTICAL)
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(fEventList)
.AddGroup(B_HORIZONTAL)
.Add(menuField)

View File

@ -459,7 +459,7 @@ TouchpadPrefView::SetupView()
fRevertButton->SetEnabled(false);
BLayoutBuilder::Group<>(this, B_VERTICAL)
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(scrollBox)
.Add(tapBox)
.AddGroup(B_HORIZONTAL)

View File

@ -213,7 +213,7 @@ SettingsWindow::SettingsWindow()
fRevertButton->SetEnabled(false);
BLayoutBuilder::Group<>(this, B_VERTICAL)
.SetInsets(B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_WINDOW_SPACING)
.Add(box)
.AddGroup(B_HORIZONTAL)
.Add(fDefaultsButton)