C++ SExpandableArea - How to style colors to look like default UE4 Editor colors ?

Hello Forum,

I have made a little plugin for spawning Static Mesh Actors into the current level so that they exactly match the Softimage XSI scene.
However. I try to organize the plugin window a bit and now i want that the colors of my Expandable Areas match the colors of the UE4 Editor.

I tryd a lot already, but the closest i can come is a transparent checkerboard that looks like a photoshop empty layer.
So my question is: How to define/style a brush? or whatever so that it looks like default UE4 Editor GUI ?

Slate_Style_Plugin.png


#define IMAGE_BRUSH( RelativePath, ... )  FSlateImageBrush ( Style->RootToContentDir( RelativePath, TEXT(".png") ), __VA_ARGS__ )
#define BOX_BRUSH( RelativePath, ... )    FSlateBoxBrush   ( Style->RootToContentDir( RelativePath, TEXT(".png") ), __VA_ARGS__ )
#define BORDER_BRUSH( RelativePath, ... ) FSlateBorderBrush( Style->RootToContentDir( RelativePath, TEXT(".png") ), __VA_ARGS__ )
#define TTF_FONT( RelativePath, ... )     FSlateFontInfo   ( Style->RootToContentDir( RelativePath, TEXT(".ttf") ), __VA_ARGS__ )
#define OTF_FONT( RelativePath, ... )     FSlateFontInfo   ( Style->RootToContentDir( RelativePath, TEXT(".otf") ), __VA_ARGS__ )

const FVector2D Icon16x16(16.0f, 16.0f);
const FVector2D Icon20x20(20.0f, 20.0f);
const FVector2D Icon40x40(40.0f, 40.0f);
const FVector2D Icon128x128(128.0f, 128.0f);
const FVector2D Icon256x256(256.0f, 256.0f);

TSharedRef< FSlateStyleSet > FXSI2UE4Style::Create()
{
    TSharedRef< FSlateStyleSet > Style = MakeShareable(new FSlateStyleSet("XSI2UE4Style"));
    Style->SetContentRoot(IPluginManager::Get().FindPlugin("XSI2UE4")->GetBaseDir() / TEXT("Resources"));

    Style->Set("XSI2UE4.OpenPluginWindow", new IMAGE_BRUSH(TEXT("ButtonIcon_40x"), Icon40x40));

    Style->Set("HG0", new BORDER_BRUSH(TEXT("Icon128"), Icon128x128));

    Style->Set("HG1", new IMAGE_BRUSH(TEXT("Logo"), Icon256x256));
    Style->Set("HG2", new IMAGE_BRUSH(TEXT("Icon128"), Icon128x128));

    Style->Set("CB", new FSlateColorBrush(FColor(1, 0, 0, 0)));

    return Style;
}

#undef IMAGE_BRUSH
#undef BOX_BRUSH
#undef BORDER_BRUSH
#undef TTF_FONT
#undef OTF_FONT



return SNew(SDockTab)
                .TabRole(ETabRole::NomadTab)
                
                        SNew(SVerticalBox)
                        + SVerticalBox::Slot()
                        .HAlign(HAlign_Left)
                        .VAlign(VAlign_Top)
                        //.MaxHeight(60.0f)
                        .AutoHeight()
                        .Padding(1)
                        

                                    SNew(SHorizontalBox)
                                    + SHorizontalBox::Slot()
                                    .HAlign(HAlign_Fill)
                                    

                                                SNew(SExpandableArea)
                                                .InitiallyCollapsed(true)
                                                .Padding(8.0f)
                                                //.HeaderPadding(8.0f)
                                                //.BodyBorderImage(FEditorStyle::GetBrush("HG2"))
                                                .BorderBackgroundColor(FEditorStyle::GetColor("CB"))
                                                .BorderImage(FEditorStyle::GetBrush("CB"))
                                                //.AreaTitle(LOCTEXT("Dimensions_Label", "Dimensions"))

                                                .HeaderContent()
                                                
                                                    SNew(STextBlock)
                                                    .Text(NSLOCTEXT("ToolWidget1", "CategoryHeader", "Tool 1: Spawn SMA Instances"))
                                                    .MinDesiredWidth(10000)
                                                ]
                                                .BodyContent()
                                                
                                                        SNew(SVerticalBox)
                                                            + SVerticalBox::Slot()
                                                            .HAlign(HAlign_Center)
                                                            .VAlign(VAlign_Center)
                                                            //.AutoHeight()
                                                            .MaxHeight(60)
                                                            
                                                                    SNew(SButton)
                                                                    .VAlign(VAlign_Center)
                                                                    .HAlign(HAlign_Center)
                                                                    .Text(FText::FromString("Spawn SMA Instances"))
                                                                    .ToolTipText(FText::FromString("Spawn Instances of selected Static Mesh to this Level as an Actor"))
                                                                    .DesiredSizeScale(FVector2D(100.0f, 60.0f))
                                                                    .OnClicked_Raw(this, &FXSI2UE4Module::OnButtonClicked)
                                                            ]

                                                            + SVerticalBox::Slot()
                                                            .HAlign(HAlign_Center)
                                                            .VAlign(VAlign_Center)
                                                            //.AutoHeight()
                                                            .MaxHeight(60.0f)
                                                            
                                                                    SNew(STextBlock)
                                                                    .Text_Lambda([this]()->FText {return WidgetText; })
                                                            ]
                                                ]
                                    ]
                        ]



                        +SVerticalBox::Slot()
                        .HAlign(HAlign_Left)
                        .VAlign(VAlign_Top)
                        //.MaxHeight(100.0f)
                        .AutoHeight()
                        .Padding(1)
                        

                                                SNew(SHorizontalBox)
                                                +SHorizontalBox::Slot()
                                                .HAlign(HAlign_Fill)
                                                

                                                            SNew(SExpandableArea)
                                                            .InitiallyCollapsed(true)
                                                            .Padding(8.0f)
                                                            .HeaderContent()
                                                            
                                                                SNew(STextBlock)
                                                                .Text(NSLOCTEXT("ToolWidget2", "CategoryHeader", "Tool 2: Update SMA Instances"))
                                                                .MinDesiredWidth(10000)
                                                            ]
                                                            .BodyContent()
                                                            


                                                                SNew(SVerticalBox)
                                                                + SVerticalBox::Slot()
                                                                .HAlign(HAlign_Center)
                                                                .VAlign(VAlign_Center)
                                                                .AutoHeight()
                                                                

                                                                        SNew(STextBlock)
                                                                        .Text(LOCTEXT("Length_label", "Placeholder"))
                                                                        .MinDesiredWidth(500)

                                                                ]
                                                            ]
                                                ]
                        ]

You can use all existing Editor styles available from SlateEditorStyle.cpp instead of trying to remake what they already do.

Okay. I try to find out how to do that. Thank you!!
Another thing i noticed is, that the whole UE4 Editor uses “SDetailCategoryTableRow”.
But hereits recommended to use “SExpandableArea” instead.