Skip to content

Commit 80a20ce

Browse files
committed
Fix Slate Formatting
1 parent 77dada1 commit 80a20ce

14 files changed

+1044
-963
lines changed

.clang-format

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Language: Cpp
33
BasedOnStyle: Google
44
AccessModifierOffset: -4
5-
AlignAfterOpenBracket: Align
5+
AlignAfterOpenBracket: BlockIndent
66
AlignConsecutiveMacros: None
77
AlignConsecutiveAssignments: None
88
AlignConsecutiveDeclarations: None
@@ -82,8 +82,10 @@ IndentPPDirectives: None
8282
IndentWidth: 4
8383
IndentWrappedFunctionNames: false
8484
KeepEmptyLinesAtTheStartOfBlocks: false
85+
LambdaBodyIndentation: OuterScope
8586
MaxEmptyLinesToKeep: 3
8687
NamespaceIndentation: None
88+
PackConstructorInitializers: CurrentLine
8789
PenaltyBreakAssignment: 2
8890
PenaltyBreakBeforeFirstCallParameter: 1
8991
PenaltyBreakComment: 300
@@ -93,6 +95,7 @@ PenaltyBreakTemplateDeclaration: 10
9395
PenaltyExcessCharacter: 1000000
9496
PenaltyReturnTypeOnItsOwnLine: 200
9597
PointerAlignment: Left
98+
QualifierAlignment: Left
9699
RawStringFormats:
97100
- Language: Cpp
98101
Delimiters:
@@ -107,6 +110,7 @@ RawStringFormats:
107110
BasedOnStyle: google
108111
ReferenceAlignment: Left
109112
ReflowComments: true
113+
SeparateDefinitionBlocks: Always
110114
SortIncludes: Never
111115
SortUsingDeclarations: false
112116
SpaceAfterCStyleCast: false

Source/Linter/Private/BatchRenameTool/BatchRenameTool.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,25 @@ FDlgBatchRenameTool::FDlgBatchRenameTool(const TArray<FAssetData> Assets) :
3131
bRemoveSuffix(false),
3232
SelectedAssets(Assets) {
3333
if (FSlateApplication::IsInitialized()) {
34+
// clang-format off
35+
// @formatter:off
3436
DialogWindow = SNew(SWindow)
35-
.Title(LOCTEXT("BatchRenameToolDlgTitle", "Batch Rename Tool"))
36-
.SupportsMinimize(false).SupportsMaximize(false)
37-
.SaneWindowPlacement(true)
38-
.AutoCenter(EAutoCenter::PreferredWorkArea)
39-
.ClientSize(FVector2D(350, 165));
37+
.Title(LOCTEXT("BatchRenameToolDlgTitle", "Batch Rename Tool"))
38+
.SupportsMinimize(false).SupportsMaximize(false)
39+
.SaneWindowPlacement(true)
40+
.AutoCenter(EAutoCenter::PreferredWorkArea)
41+
.ClientSize(FVector2D(350, 165));
4042

4143
const TSharedPtr<SBorder> DialogWrapper =
4244
SNew(SBorder)
43-
.BorderImage(FAppStyle::GetBrush("ToolPanel.GroupBorder"))
44-
.Padding(4.0f)
45+
.BorderImage(FAppStyle::GetBrush("ToolPanel.GroupBorder"))
46+
.Padding(4.0f)
4547
[
4648
SAssignNew(DialogWidget, SDlgBatchRenameTool)
4749
.ParentWindow(DialogWindow)
4850
];
51+
// clang-format on
52+
// @formatter:on
4953

5054
DialogWindow->SetContent(DialogWrapper.ToSharedRef());
5155
}

Source/Linter/Private/Linter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,13 @@ void FLinterModule::ShutdownModule() {
7979
TSharedRef<SDockTab> FLinterModule::SpawnTab(const FSpawnTabArgs& TabSpawnArgs, TSharedPtr<FSlateStyleSet> StyleSet) {
8080
const FSlateBrush* IconBrush = StyleSet->GetBrush("Linter.Toolbar.Icon");
8181

82+
// clang-format off
83+
// @formatter:off
8284
const TSharedRef<SDockTab> MajorTab =
8385
SNew(SDockTab)
8486
.TabRole(ETabRole::MajorTab);
87+
// clang-format on
88+
// @formatter:on
8589

8690
MajorTab->SetContent(SNew(SLintWizard));
8791
MajorTab->SetTabIcon(IconBrush);

Source/Linter/Private/LinterNamingConvention.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ void FLinterNamingConventionDetails::OnGenerateElementForDetails(const TSharedRe
3636
}
3737
));
3838

39+
// clang-format off
40+
// @formatter:off
3941
ChildrenBuilder.AddCustomRow(FText::GetEmpty())
4042
[
4143
SNew(SHorizontalBox)
@@ -66,6 +68,8 @@ void FLinterNamingConventionDetails::OnGenerateElementForDetails(const TSharedRe
6668
SNew(SProperty, StructProperty->GetChildHandle("Suffix"))
6769
]
6870
];
71+
// clang-format on
72+
// @formatter:on
6973
}
7074

7175
ULinterNamingConvention::ULinterNamingConvention(const FObjectInitializer& ObjectInitializer) :

Source/Linter/Private/TooltipTool/TooltipTool.cpp

Lines changed: 335 additions & 339 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)