Heavily discussed and diagnosed in this thread: [Link Removed]
[Link Removed] narrowed down the cause:
It's the calculation inside the SWindow that is wrong, sometime. It adds SWindowDefs::DefaultTitleBarSize in SWindow::GetWIndowSizeFromCientSize
I am not sure how to prevent that in all the cases.
TSharedRef<SWindow> MyWindow = SNew(SWindow) .SizingRule(ESizingRule::Autosized) .SupportsMaximize(false) .SupportsMinimize(false) .MinHeight(0.f) [ SNew(SVerticalBox) + SVerticalBox::Slot() .AutoHeight() [ SNew(SButton).Text(NSLOCTEXT("UnrealEd", "OK", "OK")) ] + SVerticalBox::Slot() .AutoHeight() [ SNew(SButton).Text(NSLOCTEXT("UnrealEd", "OK", "OK")) ] + SVerticalBox::Slot() .AutoHeight() [ SNew(SButton).Text(NSLOCTEXT("UnrealEd", "OK", "OK")) ] + SVerticalBox::Slot() .AutoHeight() [ SNew(SButton).Text(NSLOCTEXT("UnrealEd", "OK", "OK")) ] + SVerticalBox::Slot() .AutoHeight() [ SNew(SButton).Text(NSLOCTEXT("UnrealEd", "OK", "OK")) ] ]; FSlateApplication::Get().AddWindow(MyWindow);
RESULT: There's unexpected white space at the bottom of the window: [Link Removed]
EXPECTED: The window fits its contents tightly, without the added whitespace at the bottom: [Link Removed]
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-166960 in the post.
1 |
Component | UE - Editor - UI Systems - Slate |
---|---|
Affects Versions | 5.1 |
Target Fix | 5.3 |
Created | Oct 12, 2022 |
---|---|
Resolved | Apr 13, 2023 |
Updated | Sep 25, 2023 |