Skip to content

Commit

Permalink
Merge pull request #489 from wyne/font-scaling
Browse files Browse the repository at this point in the history
Don't font-scale headers
  • Loading branch information
wyne authored Aug 4, 2024
2 parents 77ec4d5 + 461cce2 commit cd990c4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/Buttons/AddendButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const AddendButton: React.FunctionComponent = ({ }) => {
return (
<TouchableHighlight onPress={handlePress}>
<View style={styles.button}>
<Text style={styles.buttonText}>{addendOne}, {addendTwo}</Text>
<Text style={styles.buttonText} allowFontScaling={false}>{addendOne}, {addendTwo}</Text>
<GestureIcon />
</View>
</TouchableHighlight>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Buttons/CheckButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const CheckButton: React.FunctionComponent<Props> = ({ navigation, route }) => {
navigation.goBack();
}
}}>
<Text style={{ color: systemBlue, fontSize: 20 }}>Done</Text>
<Text style={{ color: systemBlue, fontSize: 20 }} allowFontScaling={false}>Done</Text>
</HeaderButton>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Headers/AppInfoHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const AppInfoHeader: React.FunctionComponent<Props> = ({ navigation }: Props) =>
onPress={async () => {
navigation.goBack();
}}>
<Text style={{ color: systemBlue, fontSize: 20 }}>Done</Text>
<Text style={{ color: systemBlue, fontSize: 20 }} allowFontScaling={false}>Done</Text>
</HeaderButton>
</View>
</Wrapper>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Headers/GameHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const GameHeader: React.FunctionComponent<Props> = ({ navigation }) => {
</>}
headerCenter={<>
<PrevRoundButton prevRoundHandler={prevRoundHandler} visible={isFirstRound} />
<Text style={styles.title}>Round {roundCurrent + 1}{
<Text style={styles.title} allowFontScaling={false}>Round {roundCurrent + 1}{
isLastRound ? '' : `/${lastRoundIndex}`
}</Text>
<NextRoundButton nextRoundHandler={nextRoundHandler}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Headers/HomeHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const HomeHeader: React.FunctionComponent<Props> = ({ navigation }) => {
<View style={{ backgroundColor: 'white' }}>
<CustomHeader navigation={navigation}
headerLeft={<AppInfoButton navigation={navigation} />}
headerCenter={<Text style={styles.title}>ScorePad</Text>}
headerCenter={<Text style={styles.title} allowFontScaling={false}>ScorePad</Text>}
headerRight={<NewGameButton navigation={navigation} />}
animated={true}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Headers/SettingsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const SettingsHeader: React.FunctionComponent<Props> = ({ navigation, route }) =
return (
<CustomHeader navigation={navigation}
headerLeft={<></>}
headerCenter={<Text style={styles.title}>Edit Game</Text>}
headerCenter={<Text style={styles.title} allowFontScaling={false}>Edit Game</Text>}
headerRight={<CheckButton navigation={navigation} route={route} />}
/>
);
Expand Down
4 changes: 2 additions & 2 deletions src/screens/ListScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import * as Application from 'expo-application';
import { BlurView } from 'expo-blur';
import * as Crypto from 'expo-crypto';
import { StyleSheet, Text, View } from 'react-native';
import { Platform, StyleSheet, Text, View } from 'react-native';
import Animated, { Easing, LinearTransition } from 'react-native-reanimated';
import { SafeAreaView } from 'react-native-safe-area-context';
import { SemVer, parse } from 'semver';
Expand Down Expand Up @@ -89,7 +89,7 @@ const ListScreen: React.FunctionComponent<Props> = ({ navigation }) => {
keyExtractor={item => item}
>
</Animated.FlatList>
<BlurView intensity={20} style={{
<BlurView intensity={20} experimentalBlurMethod={Platform.OS == 'android' ? 'dimezisBlurView' : undefined} style={{
position: 'absolute', bottom: 0, left: 0, right: 0, height: 60,
justifyContent: 'flex-start', alignItems: 'center',
borderTopWidth: 1, borderColor: '#ccc',
Expand Down

0 comments on commit cd990c4

Please sign in to comment.