Skip to content

Commit

Permalink
Androidスマホ調整
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyKitten committed Oct 13, 2024
1 parent 0bf3288 commit a60a8af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
14 changes: 4 additions & 10 deletions src/components/LineBoardToei.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LinearGradient } from 'expo-linear-gradient'
import React, { useCallback, useMemo, useState } from 'react'
import { Dimensions, Platform, StyleSheet, View } from 'react-native'
import { Dimensions, StyleSheet, View } from 'react-native'
import { RFValue } from 'react-native-responsive-fontsize'
import { useRecoilValue } from 'recoil'
import { Line, Station } from '../../gen/proto/stationapi_pb'
Expand Down Expand Up @@ -112,17 +112,14 @@ const styles = StyleSheet.create({
fontSize: RFValue(16),
fontWeight: 'bold',
marginLeft: isTablet ? 5 : 2.5,
marginBottom: Platform.select({
ios: 0,
android: isTablet ? 0 : -4,
}),
marginBottom: 0,
},
stationNameExtra: {
width: RFValue(10),
textAlign: 'center',
fontSize: RFValue(10),
fontWeight: 'bold',
marginBottom: Platform.select({ ios: 0, android: isTablet ? 0 : -4 }),
marginBottom: 0,
},
stationNameEn: {
fontSize: RFValue(16),
Expand All @@ -132,10 +129,7 @@ const styles = StyleSheet.create({
},
stationNameHorizontalContainer: {
position: 'relative',
bottom: Platform.select({
ios: 0,
android: isTablet ? -4 : 0,
}),
bottom: 0,
justifyContent: 'flex-start',
},
stationNameHorizontalWrapper: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/TrainTypeBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ const TrainTypeBox: React.FC<Props> = ({ trainType, isTY }: Props) => {
...styles.text,
letterSpacing,
marginLeft,
width: '100%',
},
]}
adjustsFontSizeToFit
Expand Down Expand Up @@ -261,6 +260,7 @@ const TrainTypeBox: React.FC<Props> = ({ trainType, isTY }: Props) => {
{showNextTrainType && nextTrainType?.nameRoman ? (
<Typography
style={[
styles.text,
styles.nextTrainType,
{
color: theme === APP_THEME.TY ? '#fff' : '#444',
Expand Down
3 changes: 2 additions & 1 deletion src/components/Typography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { StyleProp, Text, TextProps, TextStyle } from 'react-native'
import { FONTS } from '../constants'
import { useThemeStore } from '../hooks/useThemeStore'
import { APP_THEME } from '../models/Theme'
import isTablet from '../utils/isTablet'

const Typography = forwardRef((props: TextProps, ref: LegacyRef<Text>) => {
const isLEDTheme = useThemeStore((state) => state === APP_THEME.LED)
Expand All @@ -19,7 +20,7 @@ const Typography = forwardRef((props: TextProps, ref: LegacyRef<Text>) => {
{
fontFamily,
color: isLEDTheme ? '#fff' : '#333',
includeFontPadding: false,
includeFontPadding: !isTablet,
},
overrideStyle,
],
Expand Down

0 comments on commit a60a8af

Please sign in to comment.