You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fix checkbox style on editor utility widgets.
#jira UE-117887 #rb Vincent.Gauthier #preflight 6148f759315f54000134958f [CL 17576768 by daren cheng in ue5-main branch]
This commit is contained in:
@@ -39,6 +39,8 @@ public:
|
||||
return bAutoRunDefaultAction;
|
||||
}
|
||||
|
||||
virtual bool IsEditorUtility() const override { return true; }
|
||||
|
||||
protected:
|
||||
UPROPERTY(Category = Config, EditDefaultsOnly, BlueprintReadWrite, AssetRegistrySearchable)
|
||||
FString HelpText;
|
||||
|
||||
@@ -262,7 +262,17 @@ struct SLATECORE_API FCheckBoxStyle : public FSlateWidgetStyle
|
||||
UndeterminedImage.UnlinkColors();
|
||||
UndeterminedHoveredImage.UnlinkColors();
|
||||
UndeterminedPressedImage.UnlinkColors();
|
||||
BackgroundImage.UnlinkColors();
|
||||
BackgroundHoveredImage.UnlinkColors();
|
||||
BackgroundPressedImage.UnlinkColors();
|
||||
|
||||
ForegroundColor.Unlink();
|
||||
HoveredForeground.Unlink();
|
||||
PressedForeground.Unlink();
|
||||
CheckedForeground.Unlink();
|
||||
CheckedHoveredForeground.Unlink();
|
||||
CheckedPressedForeground.Unlink();
|
||||
UndeterminedForeground.Unlink();
|
||||
BorderBackgroundColor.Unlink();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -44,6 +44,9 @@ UButton::UButton(const FObjectInitializer& ObjectInitializer)
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
WidgetStyle = *EditorButtonStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ UCheckBox::UCheckBox(const FObjectInitializer& ObjectInitializer)
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
WidgetStyle = *EditorCheckboxStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -44,6 +44,9 @@ UCircularThrobber::UCircularThrobber(const FObjectInitializer& ObjectInitializer
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
Image = *EditorCircularThrobberBrushStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -22,6 +22,12 @@ UComboBoxKey::UComboBoxKey()
|
||||
const ISlateStyle& SlateStyle = IsEditorWidget() ? FCoreStyle::Get() : FUMGCoreStyle::Get();
|
||||
WidgetStyle = SlateStyle.GetWidgetStyle<FComboBoxStyle>("ComboBox");
|
||||
ItemStyle = SlateStyle.GetWidgetStyle<FTableRowStyle>("TableView.Row");
|
||||
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#else
|
||||
WidgetStyle = FUMGCoreStyle::Get().GetWidgetStyle<FComboBoxStyle>("ComboBox");
|
||||
ItemStyle = FUMGCoreStyle::Get().GetWidgetStyle<FTableRowStyle>("TableView.Row");
|
||||
|
||||
@@ -63,6 +63,9 @@ UComboBoxString::UComboBoxString(const FObjectInitializer& ObjectInitializer)
|
||||
{
|
||||
WidgetStyle = *EditorComboBoxStyle;
|
||||
ItemStyle = *EditorComboBoxRowStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -44,6 +44,9 @@ UEditableText::UEditableText(const FObjectInitializer& ObjectInitializer)
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
WidgetStyle = *EditorEditableTextStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -66,6 +66,9 @@ UEditableTextBox::UEditableTextBox(const FObjectInitializer& ObjectInitializer)
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
WidgetStyle = *EditorEditableTextBoxStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ UExpandableArea::UExpandableArea(const FObjectInitializer& ObjectInitializer)
|
||||
{
|
||||
Style = *EditorExpandableAreaStyle;
|
||||
BorderBrush = *EditorExpandableAreaBorderBrush;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -62,6 +62,9 @@ UInputKeySelector::UInputKeySelector( const FObjectInitializer& ObjectInitialize
|
||||
{
|
||||
WidgetStyle = *EditorInputKeySelectorButtonStyle;
|
||||
TextStyle = *EditorInputKeySelectorTextStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ UMultiLineEditableText::UMultiLineEditableText(const FObjectInitializer& ObjectI
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
WidgetStyle = *EditorMultiLineEditableTextStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -67,6 +67,9 @@ UMultiLineEditableTextBox::UMultiLineEditableTextBox(const FObjectInitializer& O
|
||||
{
|
||||
WidgetStyle = *EditorMultiLineEditableTextBoxStyle;
|
||||
TextStyle = *EditorMultiLineEditableTextBoxTextStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ UProgressBar::UProgressBar(const FObjectInitializer& ObjectInitializer)
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
WidgetStyle = *EditorProgressBarStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -48,6 +48,9 @@ UScrollBar::UScrollBar(const FObjectInitializer& ObjectInitializer)
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
WidgetStyle = *EditorScrollBarStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
}
|
||||
|
||||
@@ -80,6 +80,9 @@ UScrollBox::UScrollBox(const FObjectInitializer& ObjectInitializer)
|
||||
{
|
||||
WidgetStyle = *EditorScrollBoxStyle;
|
||||
WidgetBarStyle = *EditorScrollBoxBarStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -52,6 +52,9 @@ USlider::USlider(const FObjectInitializer& ObjectInitializer)
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
WidgetStyle = *EditorSliderStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -61,6 +61,9 @@ USpinBox::USpinBox(const FObjectInitializer& ObjectInitializer)
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
WidgetStyle = *EditorSpinBoxStyle;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
|
||||
|
||||
@@ -47,6 +47,9 @@ UThrobber::UThrobber(const FObjectInitializer& ObjectInitializer)
|
||||
if (IsEditorWidget())
|
||||
{
|
||||
Image = *EditorThrobberBrush;
|
||||
|
||||
// The CDO isn't an editor widget and thus won't use the editor style, call post edit change to mark difference from CDO
|
||||
PostEditChange();
|
||||
}
|
||||
#endif // WITH_EDITOR
|
||||
}
|
||||
|
||||
@@ -1089,6 +1089,10 @@ bool UWidget::IsEditorWidget() const
|
||||
{
|
||||
return WidgetBP->AllowEditorWidget();
|
||||
}
|
||||
else if (UUserWidget* UserWidget = Cast<UUserWidget>(WidgetBPObject))
|
||||
{
|
||||
return UserWidget->IsEditorUtility();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user