SColorBlock::ComputeDesiredSize

Overwritten from [SWidget](API\Runtime\SlateCore\Widgets\SWidget).

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Colors/SColorBlock.h

Include

#include "Widgets/Colors/SColorBlock.h"

Source

/Engine/Source/Runtime/Slate/Private/Widgets/Colors/SColorBlock.cpp

Syntax

virtual FVector2D ComputeDesiredSize
(
    float
) const

Remarks

Overwritten from SWidget.

LeafWidgets should compute their DesiredSize based solely on their visual representation. There is no need to take child widgets into account as LeafWidgets have none by definition. For example, the TextBlock widget simply measures the area necessary to display its text with the given font and font size.