Skip to content

Commit

Permalink
Fix Slate Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jwindgassen committed Nov 8, 2023
1 parent 77dada1 commit 80a20ce
Show file tree
Hide file tree
Showing 14 changed files with 1,044 additions and 963 deletions.
6 changes: 5 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Language: Cpp
BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignAfterOpenBracket: BlockIndent
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
Expand Down Expand Up @@ -82,8 +82,10 @@ IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: OuterScope
MaxEmptyLinesToKeep: 3
NamespaceIndentation: None
PackConstructorInitializers: CurrentLine
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
Expand All @@ -93,6 +95,7 @@ PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
QualifierAlignment: Left
RawStringFormats:
- Language: Cpp
Delimiters:
Expand All @@ -107,6 +110,7 @@ RawStringFormats:
BasedOnStyle: google
ReferenceAlignment: Left
ReflowComments: true
SeparateDefinitionBlocks: Always
SortIncludes: Never
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
Expand Down
18 changes: 11 additions & 7 deletions Source/Linter/Private/BatchRenameTool/BatchRenameTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,25 @@ FDlgBatchRenameTool::FDlgBatchRenameTool(const TArray<FAssetData> Assets) :
bRemoveSuffix(false),
SelectedAssets(Assets) {
if (FSlateApplication::IsInitialized()) {
// clang-format off
// @formatter:off
DialogWindow = SNew(SWindow)
.Title(LOCTEXT("BatchRenameToolDlgTitle", "Batch Rename Tool"))
.SupportsMinimize(false).SupportsMaximize(false)
.SaneWindowPlacement(true)
.AutoCenter(EAutoCenter::PreferredWorkArea)
.ClientSize(FVector2D(350, 165));
.Title(LOCTEXT("BatchRenameToolDlgTitle", "Batch Rename Tool"))
.SupportsMinimize(false).SupportsMaximize(false)
.SaneWindowPlacement(true)
.AutoCenter(EAutoCenter::PreferredWorkArea)
.ClientSize(FVector2D(350, 165));

const TSharedPtr<SBorder> DialogWrapper =
SNew(SBorder)
.BorderImage(FAppStyle::GetBrush("ToolPanel.GroupBorder"))
.Padding(4.0f)
.BorderImage(FAppStyle::GetBrush("ToolPanel.GroupBorder"))
.Padding(4.0f)
[
SAssignNew(DialogWidget, SDlgBatchRenameTool)
.ParentWindow(DialogWindow)
];
// clang-format on
// @formatter:on

DialogWindow->SetContent(DialogWrapper.ToSharedRef());
}
Expand Down
4 changes: 4 additions & 0 deletions Source/Linter/Private/Linter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,13 @@ void FLinterModule::ShutdownModule() {
TSharedRef<SDockTab> FLinterModule::SpawnTab(const FSpawnTabArgs& TabSpawnArgs, TSharedPtr<FSlateStyleSet> StyleSet) {
const FSlateBrush* IconBrush = StyleSet->GetBrush("Linter.Toolbar.Icon");

// clang-format off
// @formatter:off
const TSharedRef<SDockTab> MajorTab =
SNew(SDockTab)
.TabRole(ETabRole::MajorTab);
// clang-format on
// @formatter:on

MajorTab->SetContent(SNew(SLintWizard));
MajorTab->SetTabIcon(IconBrush);
Expand Down
4 changes: 4 additions & 0 deletions Source/Linter/Private/LinterNamingConvention.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ void FLinterNamingConventionDetails::OnGenerateElementForDetails(const TSharedRe
}
));

// clang-format off
// @formatter:off
ChildrenBuilder.AddCustomRow(FText::GetEmpty())
[
SNew(SHorizontalBox)
Expand Down Expand Up @@ -66,6 +68,8 @@ void FLinterNamingConventionDetails::OnGenerateElementForDetails(const TSharedRe
SNew(SProperty, StructProperty->GetChildHandle("Suffix"))
]
];
// clang-format on
// @formatter:on
}

ULinterNamingConvention::ULinterNamingConvention(const FObjectInitializer& ObjectInitializer) :
Expand Down
674 changes: 335 additions & 339 deletions Source/Linter/Private/TooltipTool/TooltipTool.cpp

Large diffs are not rendered by default.

Loading

0 comments on commit 80a20ce

Please sign in to comment.