Remove unneeded frame

This commit is contained in:
boatbomber 2023-09-18 20:44:45 -04:00
parent b8e5fda482
commit e7cf73320b

View file

@ -150,69 +150,63 @@ function Notification:render()
transparency = transparency, transparency = transparency,
size = UDim2.new(1, 0, 1, 0), size = UDim2.new(1, 0, 1, 0),
}, { }, {
Contents = e("Frame", { Logo = e("ImageLabel", {
Size = UDim2.new(0, 35 + contentX, 1, -paddingY), ImageTransparency = transparency,
Position = UDim2.new(0, 0, 0, paddingY / 2), Image = if self.props.thirdParty
then Assets.Images.ThirdPartyPlugin
else Assets.Images.PluginButton,
BackgroundTransparency = 1, BackgroundTransparency = 1,
}, { Size = UDim2.new(0, logoSize, 0, logoSize),
Logo = e("ImageLabel", { Position = UDim2.new(0, 0, 0, 0),
ImageTransparency = transparency, AnchorPoint = Vector2.new(0, 0),
Image = if self.props.thirdParty }),
then Assets.Images.ThirdPartyPlugin Source = if self.props.source
else Assets.Images.PluginButton, then e("TextLabel", {
BackgroundTransparency = 1, Text = self.props.source,
Size = UDim2.new(0, logoSize, 0, logoSize),
Position = UDim2.new(0, 0, 0, 0),
AnchorPoint = Vector2.new(0, 0),
}),
Source = if self.props.source
then e("TextLabel", {
Text = self.props.source,
Font = Enum.Font.GothamMedium,
TextSize = 15,
TextColor3 = theme.Notification.InfoColor,
TextTransparency = transparency,
TextXAlignment = Enum.TextXAlignment.Left,
TextTruncate = Enum.TextTruncate.AtEnd,
Size = UDim2.new(1, -logoSize - 5, 0, logoSize),
Position = UDim2.fromOffset(logoSize + 5, 0),
BackgroundTransparency = 1,
})
else nil,
Message = e("TextLabel", {
Text = self.props.text,
Font = Enum.Font.GothamMedium, Font = Enum.Font.GothamMedium,
TextSize = 15, TextSize = 15,
TextColor3 = theme.Notification.InfoColor, TextColor3 = theme.Notification.InfoColor,
TextTransparency = transparency, TextTransparency = transparency,
TextXAlignment = Enum.TextXAlignment.Left, TextXAlignment = Enum.TextXAlignment.Left,
TextWrapped = true, TextTruncate = Enum.TextTruncate.AtEnd,
Size = UDim2.new(0, textBounds.X, 0, textBounds.Y), Size = UDim2.new(1, -logoSize - 5, 0, logoSize),
Position = if self.props.thirdParty Position = UDim2.fromOffset(logoSize + 5, 0),
then UDim2.fromOffset(0, logoSize + 5)
else UDim2.fromOffset(logoSize + 3, 0),
BackgroundTransparency = 1, BackgroundTransparency = 1,
}), })
Actions = if self.props.actions else nil,
then e("Frame", { Message = e("TextLabel", {
Size = UDim2.new(1, -40, 0, 35), Text = self.props.text,
Position = UDim2.new(1, 0, 1, 0), Font = Enum.Font.GothamMedium,
AnchorPoint = Vector2.new(1, 1), TextSize = 15,
BackgroundTransparency = 1, TextColor3 = theme.Notification.InfoColor,
}, { TextTransparency = transparency,
Layout = e("UIListLayout", { TextXAlignment = Enum.TextXAlignment.Left,
FillDirection = Enum.FillDirection.Horizontal, TextWrapped = true,
HorizontalAlignment = Enum.HorizontalAlignment.Right,
VerticalAlignment = Enum.VerticalAlignment.Center, Size = UDim2.new(0, textBounds.X, 0, textBounds.Y),
SortOrder = Enum.SortOrder.LayoutOrder, Position = if self.props.thirdParty
Padding = UDim.new(0, 5), then UDim2.fromOffset(0, logoSize + 5)
}), else UDim2.fromOffset(logoSize + 3, 0),
Buttons = Roact.createFragment(actionButtons), BackgroundTransparency = 1,
})
else nil,
}), }),
Actions = if self.props.actions
then e("Frame", {
Size = UDim2.new(1, -40, 0, 35),
Position = UDim2.new(1, 0, 1, 0),
AnchorPoint = Vector2.new(1, 1),
BackgroundTransparency = 1,
}, {
Layout = e("UIListLayout", {
FillDirection = Enum.FillDirection.Horizontal,
HorizontalAlignment = Enum.HorizontalAlignment.Right,
VerticalAlignment = Enum.VerticalAlignment.Center,
SortOrder = Enum.SortOrder.LayoutOrder,
Padding = UDim.new(0, 5),
}),
Buttons = Roact.createFragment(actionButtons),
})
else nil,
Padding = e("UIPadding", { Padding = e("UIPadding", {
PaddingLeft = UDim.new(0, paddingX / 2), PaddingLeft = UDim.new(0, paddingX / 2),