Slate SBox does not obey desired size

hi.
i’ve been working on a simple tic-tac-toe game in c++ without any blueprints to get a grasp on the programming language and the unreal environment. each square needs to be, well, square, and the only Slate element that can do that is SBox. the problem is when i put my desired width and height values into the constructor, it just doesn’t follow them. i spent the past few hours searching through the engine source code and google, but i can’t find anything. as far as i’m concerned, i’m doing it the way i’ve been told.

here’s the code:

SGameUI

void SGameUI::Construct(const FArguments& InArgs)
{

	ChildSlot
	[
		SNew( SOverlay )
		+ SOverlay::Slot()
		[
			SNew( SBox )
			.WidthOverride( 444 )
			.HeightOverride( 555 )
			[
				SNew(SBorder)
				.BorderImage(FCoreStyle::Get().GetBrush("WhiteBrush"))
				.BorderBackgroundColor(FLinearColor(1, 0, 0, 0.5))
			]
		]
	];
}

Widget Creation

void AGameMaster::BeginPlay()
{
	GameUIWidget = SNew( SGameUI );
	GEngine->GameViewport->AddViewportWidgetContent( GameUIWidget.ToSharedRef() );
	Super::BeginPlay();
}

here’s some debug information that shows the actual size isn’t the desired size
![img] (http://i.imgur.com/x9aTqiQ.png “Widget Reflector”)

got it fixed! the widget containing the SBox will force the size if its HAlign or VAlign is set to _Fill, and created widgets are set to do that by default, so putting

.HAlign( HAlign_Center )
.VAlign( VAlign_Center )

after the SOverlay slot is created fixed the problem.

If any body need the newest code for this, here it is:

ChildSlot
.HAlign(HAlign_Center)
.VAlign(VAlign_Center)
[
SNew(SBox)
.WidthOverride(500)
.HeightOverride(500)
[
SNew(SBorder)
.BorderImage(FCoreStyle::Get().GetBrush(“WhiteBrush”))
.BorderBackgroundColor(FLinearColor(1, 1, 1, 1))
]
];

Note that after child slot you need these for SBox to work properly
.HAlign(HAlign_Center)
.VAlign(VAlign_Center)