Skip to content

Commit

Permalink
Fix clang formatting instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
humdingerb committed May 28, 2024
1 parent a500ca8 commit 90fdefc
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
20 changes: 10 additions & 10 deletions src/AccountSettingsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ AccountSettingsWindow::AccountSettingsWindow(Account* account)
if (!fAccount || fAccount->IsUsingDefaultLocale()) {
fPrefView->Hide();
}
// clang off
// clang-format off
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_DEFAULT_SPACING)
.AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING)
.Add(fAccountName)
.Add(fUseDefault)
.Add(fPrefView)
.End()
.Add(fAccountName)
.Add(fUseDefault)
.Add(fPrefView)
.End()
.AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING)
.AddGlue()
.Add(cancel)
.Add(fOK)
.End()
.AddGlue()
.Add(cancel)
.Add(fOK)
.End()
.End();
// clang on
// clang-format on

CenterIn(Frame());
fAccountName->MakeFocus(true);
Expand Down
46 changes: 24 additions & 22 deletions src/PrefWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ PrefWindow::PrefWindow(const BRect& frame)

SetDefaultButton(fOK);

// clang off
// clang-format off
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_DEFAULT_SPACING)
.SetInsets(B_USE_DEFAULT_SPACING)
.AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING)
.AddGlue()
.Add(fLabel)
.AddGlue()
.End()
.AddGlue()
.Add(fLabel)
.AddGlue()
.End()
.Add(fCurrencyPrefView)
.AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING)
.AddGlue()
.Add(cancel)
.Add(fOK)
.End()
.AddGlue()
.Add(cancel)
.Add(fOK)
.End()
.End();
// clang on
// clang-format on
ResizeToPreferred();
CenterIn(frame);
}
Expand Down Expand Up @@ -128,24 +128,26 @@ CurrencyPrefView::CurrencyPrefView(const char* name, Locale* locale, const int32
fLocale.CurrencyDecimal(), new BMessage(M_NEW_CURRENCY_DECIMAL));
fCurrencyDecimalBox->SetCharacterLimit(2);

// clang off
// clang-format off
BLayoutBuilder::Group<>(fCurrencyBox, B_VERTICAL, B_USE_DEFAULT_SPACING)
.SetInsets(
B_USE_DEFAULT_SPACING, B_USE_BIG_SPACING, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
.AddGrid(B_USE_SMALL_SPACING, B_USE_SMALL_SPACING)
.Add(fCurrencySymbolBox->CreateLabelLayoutItem(), 0, 0)
.Add(fCurrencySymbolBox->CreateTextViewLayoutItem(), 1, 0)
.Add(fCurrencySymbolPrefix, 2, 0, 3, 1)
.Add(fCurrencySeparatorBox->CreateLabelLayoutItem(), 0, 1)
.Add(fCurrencySeparatorBox->CreateTextViewLayoutItem(), 1, 1)
.Add(fCurrencyDecimalBox->CreateLabelLayoutItem(), 2, 1)
.Add(fCurrencyDecimalBox->CreateTextViewLayoutItem(), 3, 1)
.AddGlue(4, 1)
.End()
.Add(fCurrencySymbolBox->CreateLabelLayoutItem(), 0, 0)
.Add(fCurrencySymbolBox->CreateTextViewLayoutItem(), 1, 0)
.Add(fCurrencySymbolPrefix, 2, 0, 3, 1)
.Add(fCurrencySeparatorBox->CreateLabelLayoutItem(), 0, 1)
.Add(fCurrencySeparatorBox->CreateTextViewLayoutItem(), 1, 1)
.Add(fCurrencyDecimalBox->CreateLabelLayoutItem(), 2, 1)
.Add(fCurrencyDecimalBox->CreateTextViewLayoutItem(), 3, 1)
.AddGlue(4, 1)
.End()
.End();

BLayoutBuilder::Group<>(this, B_VERTICAL).Add(fCurrencyBox).End();
// clang on
BLayoutBuilder::Group<>(this, B_VERTICAL)
.Add(fCurrencyBox)
.End();
// clang-format on
}

void
Expand Down

0 comments on commit 90fdefc

Please sign in to comment.