From 0d2330a31434f2eacc2fa5f418cd07dccdca6032 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Tue, 3 Sep 2024 14:25:47 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3=E8=AA=BF?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/駅名表/NextPreStationLine.tsx | 2 +- components/駅名表/StationName.tsx | 4 ++-- components/駅名表/StationNameArea.tsx | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/駅名表/NextPreStationLine.tsx b/components/駅名表/NextPreStationLine.tsx index 987a46e..27843c3 100644 --- a/components/駅名表/NextPreStationLine.tsx +++ b/components/駅名表/NextPreStationLine.tsx @@ -88,7 +88,7 @@ const 下枠左右マーク: TextStyle = { fontWeight: "bold", fontSize: parseInt("20%"), color: "white", - paddingHorizontal: 10, + paddingHorizontal: 5, textAlignVertical: "center", }; const 下枠駅ナンバー: ViewStyle = { diff --git a/components/駅名表/StationName.tsx b/components/駅名表/StationName.tsx index e94be54..745311d 100644 --- a/components/駅名表/StationName.tsx +++ b/components/駅名表/StationName.tsx @@ -1,5 +1,5 @@ import React, { FC } from "react"; -import { Text, TextStyle, View } from "react-native"; +import { Platform, Text, TextStyle, View } from "react-native"; export const StationName: FC<{ stringData: { Station_JP: string; Station_EN: string }; ss: TextStyle; @@ -15,7 +15,7 @@ export const StationName: FC<{ const styleSheet: TextStyle = { fontWeight: "bold", - fontSize: parseInt("15%"), + fontSize: Platform.OS === "ios" ? parseInt("14%") : parseInt("15%"), color: "white", flex: 1, textAlignVertical: "center", diff --git a/components/駅名表/StationNameArea.tsx b/components/駅名表/StationNameArea.tsx index 69e5735..9a8e4a4 100644 --- a/components/駅名表/StationNameArea.tsx +++ b/components/駅名表/StationNameArea.tsx @@ -1,5 +1,5 @@ import React, { CSSProperties } from "react"; -import { Text, TextStyle, View, ViewStyle } from "react-native"; +import { Platform, Text, TextStyle, View, ViewStyle } from "react-native"; export const StationNameArea = (props) => { const { currentStation, isMatsuyama } = props; @@ -14,6 +14,8 @@ export const StationNameArea = (props) => { }; const Station_JP: TextStyle = { letterSpacing: currentStation[0].Station_JP.length < 4 ? 15 : 0, + // iOSの場合、letterSPacingで末尾の文字の後ろにもpaddingが入るため、paddingLeftを設定 + paddingLeft: currentStation[0].Station_JP.length < 4 &&Platform.OS === "ios" ? 15 : 0, fontWeight: "bold", fontSize: parseInt(currentStation[0].Station_JP.length < 6 ? "40%" : "25%"),