Skip to content

Commit a7a1393

Browse files
committed
Fix Image aspect ratios
1 parent 5114ae0 commit a7a1393

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/HomePage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ const PageTitle = () => {
100100
styles.heroBackgroundImage,
101101
{
102102
opacity: colorScheme === 'light' ? 0.9 : 0.8,
103+
aspectRatio: 1,
103104
},
104105
]}
105106
/>

src/components/ControlItem.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,13 @@ const createStyles = (colors: any, isHovered: boolean, isPressing: boolean) =>
9393
controlItemIcon: {
9494
marginHorizontal: 12,
9595
width: 48,
96-
height: 72,
9796
resizeMode: 'contain',
97+
aspectRatio: 1,
98+
},
99+
controlItemPlaceholderIcon: {
100+
marginHorizontal: 12,
101+
width: 48,
102+
height: 72,
98103
},
99104
controlItemTitle: {
100105
// BodyStrongTextBlockStyle
@@ -173,7 +178,7 @@ const HomeComponentTile = ({item, navigation}: HomeComponentTileProps) => {
173178
<View>
174179
<Image
175180
source={require('../../assets/ControlImages/Placeholder.png')}
176-
style={styles.controlItemIcon}
181+
style={styles.controlItemPlaceholderIcon}
177182
accessible={true}
178183
accessibilityRole="image"
179184
accessibilityLabel={imageAccessibilityLabel}

0 commit comments

Comments
 (0)