Description

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.

Steps to Reproduce
  1. Create a new slate window using the following code:
    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);
    
  2. Launch UE and bring up the new window.

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]

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-166960 in the post.

1
Login to Vote

Fixed
ComponentUE - Editor - UI Systems - Slate
Affects Versions5.1
Target Fix5.3
Fix Commit25030590
Main Commit25030590
CreatedOct 12, 2022
ResolvedApr 13, 2023
UpdatedSep 25, 2023
View Jira Issue