You can customize the app icon and padding using the following pattern:
File name StarshipCoreStyle.cpp
line no. 282 to 287
#if 0
// Define the app icon with specific dimensions and padding
Style->Set(“AppIcon”, new IMAGE_BRUSH_SVG(“Starship/Common/YourCustomIcon”, FVector2f(36.f, 36.f), FStyleColors::Foreground));
Style->Set(“AppIconPadding”, FMargin(11.f, 11.f, 3.f, 5.f));
#else
// Alternative icon setup with larger dimensions and different padding
Style->Set(“AppIcon”, new IMAGE_BRUSH_SVG(“Starship/Common/YourCustomIcon”, FVector2f(45.f, 45.f), FStyleColors::White));
Style->Set(“AppIconPadding”, FMargin(5.f, 5.f, 5.f, 5.f));
#endif
Explanation
- Icon Path:
Replace"Starship/Common/YourCustomIcon"
with the path to your custom icon file located inEngine\Content\Slate\Starship\Common
. - Icon Dimensions:
AdjustFVector2f(x, y)
to set the width and height of your icon. For example:
FVector2f(36.f, 36.f)
sets the icon to 36x36 pixels.FVector2f(45.f, 45.f)
sets it to 45x45 pixels.
- Icon Color:
ReplaceFStyleColors::Foreground
orFStyleColors::White
with your preferred color style. - Padding:
Modify theFMargin(left, top, right, bottom)
values to customize the spacing around the icon. - Conditional Setup:
The#if 0
block allows toggling between two configurations.
- Use
#if 0
for the first setup. - Use
#else
for the alternate setup.
After making changes, rebuild your project to apply them. Let me know if you need further clarification!
FIle location: Engine\Content\Slate\Starship\Common