Files
UnrealEngineUWP/Engine/Source/Editor/PropertyEditor/Private/SDetailTableRowBase.cpp
sebastian nordgren 9c285dad01 Details rows now preserve space on the right for the scrollbar.
CustomRow() widgets can now be disabled from customizations.

Favoriting command is now hidden when favoriting is not enabled in a details panel.

Removed unnecessary code for calculating a scroll offset when the favorites category was added or removed since the Favorites category is never removed.

#rb lauren.barnes

[CL 15218520 by sebastian nordgren in ue5-main branch]
2021-01-27 13:22:18 -04:00

37 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "SDetailTableRowBase.h"
const float SDetailTableRowBase::ScrollBarPadding = 16.0f;
int32 SDetailTableRowBase::GetIndentLevelForBackgroundColor() const
{
int32 IndentLevel = 0;
if (OwnerTablePtr.IsValid())
{
// every item is in a category, but we don't want to show an indent for "top-level" properties
IndentLevel = GetIndentLevel() - 1;
}
TSharedPtr<FDetailTreeNode> DetailTreeNode = OwnerTreeNode.Pin();
if (DetailTreeNode.IsValid() &&
DetailTreeNode->GetDetailsView() != nullptr &&
DetailTreeNode->GetDetailsView()->ContainsMultipleTopLevelObjects())
{
// if the row is in a multiple top level object display (eg. Project Settings), don't display an indent for the initial level
--IndentLevel;
}
return FMath::Max(0, IndentLevel);
}
bool SDetailTableRowBase::IsScrollBarVisible(TWeakPtr<STableViewBase> OwnerTableViewWeak)
{
TSharedPtr<STableViewBase> OwnerTableView = OwnerTableViewWeak.Pin();
if (OwnerTableView.IsValid())
{
return OwnerTableView->GetScrollbarVisibility() == EVisibility::Visible;
}
return false;
}