Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit f3ed85c

Browse files
committed
Hotfix: Message box colors
1 parent ca314ba commit f3ed85c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Source/HttpGPTEditorModule/Private/Chat/SHttpGPTChatItem.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ void SHttpGPTChatItem::Construct(const FArguments& InArgs)
4242
];
4343
}
4444

45+
static FSlateColor& operator*=(FSlateColor& Lhs, const float Rhs)
46+
{
47+
FLinearColor NewColor = Lhs.GetSpecifiedColor() * Rhs;
48+
NewColor.A = 1.f;
49+
Lhs = FSlateColor(NewColor);
50+
51+
return Lhs;
52+
}
53+
4554
TSharedRef<SWidget> SHttpGPTChatItem::ConstructContent()
4655
{
4756
constexpr float SlotPadding = 4.0f;
@@ -55,13 +64,13 @@ TSharedRef<SWidget> SHttpGPTChatItem::ConstructContent()
5564
{
5665
RoleText = FText::FromString(TEXT("Assistant:"));
5766
BoxMargin = FMargin(SlotPadding, SlotPadding, SlotPadding * PaddingMultiplier, SlotPadding);
58-
MessageColor = FLinearColor::Gray;
67+
MessageColor *= 0.3f;
5968
}
6069
else if (MessageRole == EHttpGPTChatRole::System)
6170
{
6271
RoleText = FText::FromString(TEXT("System:"));
6372
BoxMargin = FMargin(SlotPadding * PaddingMultiplier * 0.5f, SlotPadding);
64-
MessageColor = FLinearColor::Black;
73+
MessageColor *= 0.f;
6574
}
6675

6776
const FMargin MessageMargin(SlotPadding * 4.f, SlotPadding, SlotPadding, SlotPadding);

0 commit comments

Comments
 (0)