@@ -80,9 +80,7 @@ export default function TabLayout() {
8080 minHeight : 0 ,
8181 } ;
8282
83- const slotContainerStyle : StyleProp < ViewStyle > = isUltrawide
84- ? [ styles . slotContainer , styles . slotContainerUltrawide ]
85- : styles . slotContainer ;
83+ const slotContainerStyle : StyleProp < ViewStyle > = styles . slotContainer ;
8684
8785 const tabs : readonly TabDef [ ] = [
8886 { name : "index" , href : "/" , icon : "wallet" , label : t ( "wallet.title" ) } ,
@@ -173,7 +171,14 @@ export default function TabLayout() {
173171 { tabs . map ( renderTrigger ) }
174172 </ TabList >
175173 < View style = { slotContainerStyle } >
176- < TabSlot />
174+ < View
175+ style = { [
176+ styles . slotInner ,
177+ isUltrawide && styles . slotInnerUltrawide ,
178+ ] }
179+ >
180+ < TabSlot />
181+ </ View >
177182 </ View >
178183 </ >
179184 ) : (
@@ -244,18 +249,30 @@ const styles = StyleSheet.create({
244249
245250 // Wrapper around <TabSlot /> that owns the flex sizing. Without this the
246251 // default TabSlot style (`flexShrink: 0`) prevents react-native-web's
247- // `<ScrollView>` from receiving a bounded height.
252+ // `<ScrollView>` from receiving a bounded height. We also center children
253+ // horizontally so the inner cap-width column on ultrawide displays sits in
254+ // the middle of the available space (not vertically centered, which is what
255+ // `alignSelf: 'center'` would do inside a row-direction parent).
248256 slotContainer : {
249257 flex : 1 ,
250258 minHeight : 0 ,
251259 minWidth : 0 ,
252260 alignSelf : "stretch" ,
261+ alignItems : "center" ,
253262 } ,
254- // On ultrawide displays the content column is centered and capped.
255- slotContainerUltrawide : {
256- maxWidth : CONTENT_MAX_WIDTH ,
257- alignSelf : "center" ,
263+ // Inner wrapper that holds the actual <TabSlot />. Always full width on
264+ // smaller screens, capped to CONTENT_MAX_WIDTH on ultrawide so cards and
265+ // text don't stretch across the viewport. Content is top-aligned because
266+ // the wrapper itself is a flex column with the default `justifyContent:
267+ // 'flex-start'`.
268+ slotInner : {
269+ flex : 1 ,
258270 width : "100%" ,
271+ minHeight : 0 ,
272+ minWidth : 0 ,
273+ } ,
274+ slotInnerUltrawide : {
275+ maxWidth : CONTENT_MAX_WIDTH ,
259276 } ,
260277
261278 // ── Bottom tab bar (< 600px) ──────────────────────────────────────────────
0 commit comments