@@ -20,7 +20,6 @@ function Item:render()
2020 local ignoresMenuOpen = props .ignoresMenuOpen
2121 local isHover = self .state .Hover and (not props .menuOpen or ignoresMenuOpen )
2222 local indent = props .Indent or 0
23- local height = props .Height or 26
2423
2524 local state = Enum .StudioStyleGuideModifier .Default
2625 if props .Active or props .SemiActive then
@@ -31,11 +30,15 @@ function Item:render()
3130
3231 local sourceText = if props .textKey then tr (props .textKey , props .textArgs ) else props .Text
3332
33+ local widthUsedUp = 48 + 16 + indent + 3
34+ if props .onSetVisible then
35+ widthUsedUp += 16 + 5
36+ end
37+
3438 return Roact .createElement (ListItemChrome , {
3539 LayoutOrder = props .LayoutOrder ,
3640 hidden = props .Hidden ,
3741 state = state ,
38- height = height ,
3942 showDivider = props .ShowDivider ,
4043
4144 mouseEnter = function (_rbx )
@@ -55,15 +58,24 @@ function Item:render()
5558 }, {
5659 StudioThemeAccessor .withTheme (function (theme )
5760 return Roact .createElement (" Frame" , {
58- Size = UDim2 .new (1 , 0 , 1 , 0 ),
61+ Size = UDim2 .fromScale (1 , 0 ),
62+ AutomaticSize = Enum .AutomaticSize .Y ,
5963 BackgroundTransparency = 1.0 ,
60- Position = UDim2 .new (0 , 0 , 0 , 0 ),
6164 }, {
65+ Layout = Roact .createElement (" UIListLayout" , {
66+ SortOrder = Enum .SortOrder .LayoutOrder ,
67+ }),
6268 TopElements = Roact .createElement (" Frame" , {
69+ LayoutOrder = 1 ,
6370 BackgroundTransparency = 1 ,
64- Size = UDim2 .new ( 1 , - indent , 0 , 26 ),
65- Position = UDim2 . new ( 0 , indent - 10 , 0 , 0 ) ,
71+ Size = UDim2 .fromScale ( 1. 0 , 0.0 ),
72+ AutomaticSize = Enum . AutomaticSize . Y ,
6673 }, {
74+ Padding = Roact .createElement (" UIPadding" , {
75+ PaddingTop = UDim .new (0 , 3 ),
76+ PaddingBottom = UDim .new (0 , 3 ),
77+ PaddingLeft = UDim .new (0 , indent ),
78+ }),
6779 Checkbox = props .Checked ~= nil and Roact .createElement (Checkbox , {
6880 Checked = props .Checked ,
6981 Disabled = props .CheckDisabled ,
@@ -82,7 +94,8 @@ function Item:render()
8294 BackgroundTransparency = 1.0 ,
8395 TextXAlignment = Enum .TextXAlignment .Left ,
8496 Position = props .Icon and UDim2 .new (0 , 48 + 16 , 0 , 0 ) or UDim2 .new (0 , 14 , 0 , 0 ),
85- Size = UDim2 .new (1 , - 40 , 1 , 0 ),
97+ Size = UDim2 .new (1 , - widthUsedUp , 0.0 , 0 ),
98+ AutomaticSize = Enum .AutomaticSize .Y ,
8699 Text = props .IsInput and (props .TextBoxText or " " ) or sourceText ,
87100 AutoLocalize = false ,
88101 ClearTextOnFocus = if props .IsInput then props .ClearTextOnFocus else nil ,
@@ -92,6 +105,7 @@ function Item:render()
92105 Font = Enum .Font .SourceSans ,
93106 TextSize = 20 ,
94107 TextColor3 = theme :GetColor (" MainText" ),
108+ TextWrapped = true ,
95109
96110 [Roact .Event .FocusLost ] = props .IsInput and function (rbx , enterPressed )
97111 local text = rbx .Text
@@ -108,7 +122,7 @@ function Item:render()
108122 ),
109123 Visibility = props .onSetVisible and Roact .createElement (Icon , {
110124 Name = props .Visible and " lightbulb" or " lightbulb_off" ,
111- Position = UDim2 .new (1 , 5 , 0.5 , 0 ),
125+ Position = UDim2 .new (1 , - 5 , 0.5 , 0 ),
112126 AnchorPoint = Vector2 .new (1 , 0.5 ),
113127
114128 onClick = props .onSetVisible ,
@@ -129,7 +143,9 @@ function Item:render()
129143 }),
130144 }),
131145 Children = Roact .createElement (" Frame" , {
132- Size = UDim2 .new (1 , 0 , 1 , - 26 ),
146+ LayoutOrder = 2 ,
147+ Size = UDim2 .fromScale (1 , 0 ),
148+ AutomaticSize = Enum .AutomaticSize .Y ,
133149 Position = UDim2 .new (0 , 0 , 0 , 26 ),
134150 BackgroundColor3 = theme :GetColor (" MainBackground" ),
135151 BorderSizePixel = 0 ,
0 commit comments