Browse Source

[RN] Improve app-settings back button style

master
zbettenbuk 7 years ago
parent
commit
aa9efd6f69

+ 2
- 8
react/features/app-settings/components/BackButton.native.js View File

@@ -4,15 +4,9 @@ import React, { Component } from 'react';
4 4
 import { TouchableOpacity } from 'react-native';
5 5
 
6 6
 import { Icon } from '../../base/font-icons';
7
-import { Platform } from '../../base/react';
8 7
 
9 8
 import styles from './styles';
10 9
 
11
-/**
12
- * The icon glyph to be used on a specific platform.
13
- */
14
-const BACK_ICON = Platform.OS === 'android' ? 'arrow_back' : 'navigate_before';
15
-
16 10
 /**
17 11
  * The type of the React {@code Component} props of {@link BackButton}
18 12
  */
@@ -30,7 +24,7 @@ type Props = {
30 24
 };
31 25
 
32 26
 /**
33
- * A component rendering a back button that looks native on both platforms.
27
+ * A component rendering a back button.
34 28
  */
35 29
 export default class BackButton extends Component<Props> {
36 30
     /**
@@ -45,7 +39,7 @@ export default class BackButton extends Component<Props> {
45 39
                 accessibilityLabel = { 'Back' }
46 40
                 onPress = { this.props.onPress }>
47 41
                 <Icon
48
-                    name = { BACK_ICON }
42
+                    name = { 'arrow_back' }
49 43
                     style = { [
50 44
                         styles.backIcon,
51 45
                         this.props.style

+ 8
- 16
react/features/app-settings/components/styles.js View File

@@ -1,5 +1,3 @@
1
-import { Platform } from 'react-native';
2
-
3 1
 import {
4 2
     BoxModel,
5 3
     ColorPalette,
@@ -19,19 +17,13 @@ const TEXT_SIZE = 17;
19 17
 export default createStyleSheet({
20 18
 
21 19
     /**
22
-     * The platform specific back button style.
20
+     * The back button style.
23 21
      */
24 22
     backIcon: {
25 23
         alignSelf: 'center',
26
-        ...Platform.select({
27
-            android: {
28
-                fontSize: 24,
29
-                padding: 8
30
-            },
31
-            ios: {
32
-                fontSize: 30
33
-            }
34
-        })
24
+        fontSize: 26,
25
+        padding: 8,
26
+        paddingRight: 22
35 27
     },
36 28
 
37 29
     /**
@@ -48,7 +40,8 @@ export default createStyleSheet({
48 40
      */
49 41
     fieldLabelContainer: {
50 42
         alignItems: 'center',
51
-        flexDirection: 'row'
43
+        flexDirection: 'row',
44
+        marginRight: 5
52 45
     },
53 46
 
54 47
     /**
@@ -92,7 +85,7 @@ export default createStyleSheet({
92 85
      */
93 86
     headerTitle: {
94 87
         color: ColorPalette.white,
95
-        fontSize: 24
88
+        fontSize: 22
96 89
     },
97 90
 
98 91
     /**
@@ -106,8 +99,7 @@ export default createStyleSheet({
106 99
      * The back button style on the settings screen.
107 100
      */
108 101
     settingsBackButton: {
109
-        color: ColorPalette.white,
110
-        fontSize: 25
102
+        color: ColorPalette.white
111 103
     },
112 104
 
113 105
     /**

Loading…
Cancel
Save