@@ -299,49 +299,48 @@ export function SideMenu(props: DrawerContentComponentProps) {
299
299
< View style = { styles . topPanel } >
300
300
< Image style = { styles . logoImage } source = { theme . primaryLogo } resizeMode = "contain" />
301
301
{ isAccountRowShown ? (
302
- < Pressable accessible = { false } onPress = { handleToggleDropdown } style = { styles . rowContainer } >
303
- < View style = { styles . rowIconContainer } >
304
- < Fontello name = "control-panel-account" style = { styles . icon } size = { theme . rem ( 1.5 ) } color = { theme . iconTappable } />
305
- </ View >
306
- < View style = { styles . rowBodyContainer } >
307
- < TitleText style = { styles . text } > { displayUsername } </ TitleText >
308
- </ View >
309
- { isMultiUsers ? (
310
- < View style = { styles . rowIconContainer } >
311
- < Animated . View style = { aRotate } >
312
- < Feather testID = "downArrow" name = "chevron-down" color = { theme . iconTappable } size = { theme . rem ( 1.5 ) } />
313
- </ Animated . View >
302
+ < >
303
+ < Pressable accessible = { false } onPress = { handleToggleDropdown } style = { styles . rowContainer } >
304
+ < View style = { styles . leftIconContainer } >
305
+ < Fontello name = "control-panel-account" style = { styles . icon } size = { theme . rem ( 1.5 ) } color = { theme . iconTappable } />
314
306
</ View >
315
- ) : null }
316
- </ Pressable >
307
+ < View style = { styles . rowBodyContainer } >
308
+ < TitleText style = { styles . text } > { displayUsername } </ TitleText >
309
+ </ View >
310
+ { isMultiUsers ? (
311
+ < View style = { styles . rightIconContainer } >
312
+ < Animated . View style = { aRotate } >
313
+ < Feather testID = "downArrow" name = "chevron-down" color = { theme . iconTappable } size = { theme . rem ( 1.5 ) } />
314
+ </ Animated . View >
315
+ </ View >
316
+ ) : null }
317
+ </ Pressable >
318
+ < DividerLine marginRem = { [ 0.25 , - 2 , 0 , 1 ] } />
319
+ </ >
317
320
) : null }
318
- < DividerLine marginRem = { [ 0.25 , - 2 , 2 , 1 ] } />
319
321
</ View >
320
322
)
321
323
322
324
const usernameDropdown = (
323
- < Animated . View style = { [ styles . dropContainer , aBorderBottomRightRadius , aDropdown ] } >
324
- < ScrollView scrollIndicatorInsets = { SCROLL_INDICATOR_INSET_FIX } >
325
- { sortedUsers . map ( userInfo => (
326
- < View key = { userInfo . loginId } style = { styles . rowContainer } >
327
- { /* This empty container is required to align the row contents properly */ }
328
- < View style = { styles . rowIconContainer } />
329
- < EdgeTouchableOpacity style = { styles . rowBodyContainer } onPress = { handleSwitchAccount ( userInfo ) } >
330
- < TitleText style = { styles . text } >
331
- { userInfo . username == null ? sprintf ( lstrings . guest_account_id_1s , userInfo . loginId . slice ( userInfo . loginId . length - 3 ) ) : userInfo . username }
332
- </ TitleText >
333
- </ EdgeTouchableOpacity >
334
- < EdgeTouchableOpacity style = { styles . rowIconContainer } onPress = { handleDeleteAccount ( userInfo ) } >
335
- < MaterialIcon accessibilityHint = { lstrings . close_control_panel_hint } color = { theme . iconTappable } name = "close" size = { theme . rem ( 1.5 ) } />
336
- </ EdgeTouchableOpacity >
337
- </ View >
338
- ) ) }
339
- </ ScrollView >
340
- </ Animated . View >
341
- )
342
-
343
- const activeDropBackground = (
344
325
< >
326
+ < Animated . View style = { [ styles . dropContainer , aBorderBottomRightRadius , aDropdown ] } >
327
+ < ScrollView scrollIndicatorInsets = { SCROLL_INDICATOR_INSET_FIX } >
328
+ { sortedUsers . map ( userInfo => (
329
+ < View key = { userInfo . loginId } style = { styles . rowContainer } >
330
+ { /* This empty container is required to align the row contents properly */ }
331
+ < View style = { styles . leftIconContainer } />
332
+ < EdgeTouchableOpacity style = { styles . rowBodyContainer } onPress = { handleSwitchAccount ( userInfo ) } >
333
+ < TitleText style = { styles . text } >
334
+ { userInfo . username == null ? sprintf ( lstrings . guest_account_id_1s , userInfo . loginId . slice ( userInfo . loginId . length - 3 ) ) : userInfo . username }
335
+ </ TitleText >
336
+ </ EdgeTouchableOpacity >
337
+ < EdgeTouchableOpacity style = { styles . rightIconContainer } onPress = { handleDeleteAccount ( userInfo ) } >
338
+ < MaterialIcon accessibilityHint = { lstrings . close_control_panel_hint } color = { theme . iconTappable } name = "close" size = { theme . rem ( 1.5 ) } />
339
+ </ EdgeTouchableOpacity >
340
+ </ View >
341
+ ) ) }
342
+ </ ScrollView >
343
+ </ Animated . View >
345
344
< Animated . View style = { [ styles . disable , styles . invisibleTapper , aFade ] } pointerEvents = "none" />
346
345
< Pressable style = { [ styles . invisibleTapper , { zIndex : isDropped ? 1 : 0 } ] } onPress = { handleToggleDropdown } />
347
346
</ >
@@ -353,7 +352,7 @@ export function SideMenu(props: DrawerContentComponentProps) {
353
352
< ScrollView overScrollMode = "always" scrollIndicatorInsets = { SCROLL_INDICATOR_INSET_FIX } >
354
353
{ rowDatas . map ( rowData => (
355
354
< EdgeTouchableOpacity accessible = { false } onPress = { rowData . pressHandler } key = { rowData . title } style = { styles . rowContainer } >
356
- < View style = { styles . rowIconContainer } >
355
+ < View style = { styles . leftIconContainer } >
357
356
{ rowData . iconName != null ? < Fontello name = { rowData . iconName } style = { styles . icon } size = { theme . rem ( 1.5 ) } color = { theme . iconTappable } /> : null }
358
357
{ rowData . iconNameFontAwesome != null ? (
359
358
< FontAwesome5Icon name = { rowData . iconNameFontAwesome } style = { styles . icon } size = { theme . rem ( 1.25 ) } color = { theme . iconTappable } />
@@ -375,7 +374,6 @@ export function SideMenu(props: DrawerContentComponentProps) {
375
374
{ topPanel }
376
375
< View style = { styles . bottomPanel } onLayout = { handleBottomPanelLayout } >
377
376
{ usernameDropdown }
378
- { activeDropBackground }
379
377
{ navigationRows }
380
378
</ View >
381
379
< Services navigation = { rootNavigation } />
@@ -421,8 +419,7 @@ const getStyles = cacheStyles((theme: Theme) => ({
421
419
borderTopColor : theme . sideMenuBorderColor ,
422
420
borderLeftColor : theme . sideMenuBorderColor ,
423
421
borderTopWidth : theme . sideMenuBorderWidth ,
424
- borderLeftWidth : theme . sideMenuBorderWidth ,
425
- height : theme . rem ( 7.75 )
422
+ borderLeftWidth : theme . sideMenuBorderWidth
426
423
} ,
427
424
footerContainer : {
428
425
position : 'absolute' ,
@@ -455,22 +452,25 @@ const getStyles = cacheStyles((theme: Theme) => ({
455
452
justifyContent : 'flex-start' ,
456
453
alignItems : 'center'
457
454
} ,
458
- rowIconContainer : {
459
- display : 'flex' ,
455
+ leftIconContainer : {
456
+ justifyContent : 'center' ,
457
+ alignItems : 'center' ,
458
+ height : theme . rem ( 3 ) ,
459
+ aspectRatio : 1
460
+ } ,
461
+ rightIconContainer : {
460
462
justifyContent : 'center' ,
461
463
alignItems : 'center' ,
462
464
height : theme . rem ( 3 ) ,
463
- aspectRatio : 1 ,
464
- marginLeft : theme . rem ( 0.25 )
465
+ marginHorizontal : theme . rem ( 0.5 )
465
466
} ,
466
467
rowBodyContainer : {
467
468
display : 'flex' ,
468
469
flexDirection : 'row' ,
469
470
justifyContent : 'flex-start' ,
470
471
alignItems : 'center' ,
471
472
flexGrow : 1 ,
472
- flexShrink : 1 ,
473
- marginRight : theme . rem ( 1 )
473
+ flexShrink : 1
474
474
} ,
475
475
// Animation
476
476
dropContainer : {
@@ -495,8 +495,7 @@ const getStyles = cacheStyles((theme: Theme) => ({
495
495
height : theme . rem ( 1.5 )
496
496
} ,
497
497
text : {
498
- fontFamily : theme . sideMenuFont ,
499
- marginLeft : theme . rem ( 0.5 )
498
+ fontFamily : theme . sideMenuFont
500
499
} ,
501
500
invisibleTapper : {
502
501
position : 'absolute' ,
0 commit comments