Browse Source

Use Image instead of avatar

This removes round corners
Arnaud Vergnet 3 years ago
parent
commit
835656bb30
2 changed files with 10 additions and 7 deletions
  1. 3
    3
      src/screens/About/AboutScreen.js
  2. 7
    4
      src/screens/Home/FeedItemScreen.js

+ 3
- 3
src/screens/About/AboutScreen.js View File

1
 // @flow
1
 // @flow
2
 
2
 
3
 import * as React from 'react';
3
 import * as React from 'react';
4
-import {FlatList, Linking, Platform} from 'react-native';
4
+import {FlatList, Linking, Platform, Image} from 'react-native';
5
 import i18n from 'i18n-js';
5
 import i18n from 'i18n-js';
6
 import {Avatar, Card, List, Title, withTheme} from 'react-native-paper';
6
 import {Avatar, Card, List, Title, withTheme} from 'react-native-paper';
7
 import {StackNavigationProp} from '@react-navigation/stack';
7
 import {StackNavigationProp} from '@react-navigation/stack';
222
           title="Campus"
222
           title="Campus"
223
           subtitle={packageJson.version}
223
           subtitle={packageJson.version}
224
           left={(iconProps: CardTitleIconPropsType): React.Node => (
224
           left={(iconProps: CardTitleIconPropsType): React.Node => (
225
-            <Avatar.Image
225
+            <Image
226
               size={iconProps.size}
226
               size={iconProps.size}
227
               source={APP_LOGO}
227
               source={APP_LOGO}
228
-              style={{backgroundColor: 'transparent'}}
228
+              style={{width: iconProps.size, height: iconProps.size}}
229
             />
229
             />
230
           )}
230
           )}
231
         />
231
         />

+ 7
- 4
src/screens/Home/FeedItemScreen.js View File

1
 // @flow
1
 // @flow
2
 
2
 
3
 import * as React from 'react';
3
 import * as React from 'react';
4
-import {Linking} from 'react-native';
5
-import {Avatar, Card, Text, withTheme} from 'react-native-paper';
4
+import {Linking, Image} from 'react-native';
5
+import {Card, Text, withTheme} from 'react-native-paper';
6
 import Autolink from 'react-native-autolink';
6
 import Autolink from 'react-native-autolink';
7
 import {StackNavigationProp} from '@react-navigation/stack';
7
 import {StackNavigationProp} from '@react-navigation/stack';
8
 import MaterialHeaderButtons, {
8
 import MaterialHeaderButtons, {
78
           title={pageSource.name}
78
           title={pageSource.name}
79
           subtitle={this.date}
79
           subtitle={this.date}
80
           left={(): React.Node => (
80
           left={(): React.Node => (
81
-            <Avatar.Image
81
+            <Image
82
               size={48}
82
               size={48}
83
               source={pageSource.icon}
83
               source={pageSource.icon}
84
-              style={{backgroundColor: 'transparent'}}
84
+              style={{
85
+                width: 48,
86
+                height: 48,
87
+              }}
85
             />
88
             />
86
           )}
89
           )}
87
         />
90
         />

Loading…
Cancel
Save