SWindow::GetWindowSizeFromClientSize

For a given client size, calculate the window size required to accommodate any potential non-OS borders and title bars

Choose your operating system:

Windows

macOS

Linux

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Widgets/SWindow.h

Include

#include "Widgets/SWindow.h"

Source

/Engine/Source/Runtime/SlateCore/Private/Widgets/SWindow.cpp

Syntax

FVector2D GetWindowSizeFromClientSize
(
    FVector2D InClientSize,
    TOptional< float > DPIScale
)

Remarks

For a given client size, calculate the window size required to accommodate any potential non-OS borders and title bars

Parameters

Parameter

Description

InClientSize

Client size with DPI scaling already applied

DPIScale

Scale that will be applied for border and title. When not supplied detects DPIScale using native or initial position.