mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +00:00
Merge branch 'fix-notif-widths' of https://github.com/boatbomber/rojo into headless-api
This commit is contained in:
commit
1ac8b9d61f
1 changed files with 5 additions and 8 deletions
|
|
@ -119,7 +119,7 @@ function Notification:render()
|
|||
end
|
||||
|
||||
local paddingY, logoSize = 20, 32
|
||||
local actionsY = if self.props.actions then 35 else 0
|
||||
local actionsY = if self.props.actions then 37 else 0
|
||||
local thirdPartyBounds = if self.props.thirdParty
|
||||
then getTextBoundsAsync(thirdPartyName, theme.Font.Main, theme.TextSize.Body, math.huge)
|
||||
+ (
|
||||
|
|
@ -129,11 +129,8 @@ function Notification:render()
|
|||
)
|
||||
else Vector2.zero
|
||||
local textXSpace = math.max(250, thirdPartyBounds.X, buttonsX) + 35
|
||||
local textBounds = Vector2.new(
|
||||
textXSpace,
|
||||
getTextBoundsAsync(self.props.text, theme.Font.Main, theme.TextSize.Body, textXSpace).Y
|
||||
)
|
||||
local contentX = math.max(textBounds.X, buttonsX, thirdPartyBounds.X)
|
||||
local textBounds = getTextBoundsAsync(self.props.text, theme.Font.Main, theme.TextSize.Body, textXSpace)
|
||||
local contentX = math.max(textBounds.X, thirdPartyBounds.X, buttonsX)
|
||||
|
||||
local size = self.binding:map(function(value)
|
||||
return UDim2.fromOffset(
|
||||
|
|
@ -210,10 +207,10 @@ function Notification:render()
|
|||
TextColor3 = theme.Notification.InfoColor,
|
||||
TextTransparency = transparency,
|
||||
TextXAlignment = Enum.TextXAlignment.Left,
|
||||
TextYAlignment = Enum.TextYAlignment.Top,
|
||||
TextYAlignment = Enum.TextYAlignment.Center,
|
||||
TextWrapped = true,
|
||||
|
||||
Size = UDim2.new(1, -35, 1, -actionsY - thirdPartyBounds.Y),
|
||||
Size = UDim2.new(0, textBounds.X, 1, -actionsY - thirdPartyBounds.Y),
|
||||
Position = UDim2.fromOffset(35, thirdPartyBounds.Y),
|
||||
|
||||
LayoutOrder = 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue