diff --git a/src/CONST.ts b/src/CONST.ts index 1e3b33d5d760..755691698286 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -92,6 +92,8 @@ const CONST = { AVATAR_MAX_WIDTH_PX: 4096, AVATAR_MAX_HEIGHT_PX: 4096, + LOGO_MAX_SCALE: 1.5, + BREADCRUMB_TYPE: { ROOT: 'root', STRONG: 'strong', diff --git a/src/components/Breadcrumbs.tsx b/src/components/Breadcrumbs.tsx index 34bc3f7e30c8..e5eb09691eba 100644 --- a/src/components/Breadcrumbs.tsx +++ b/src/components/Breadcrumbs.tsx @@ -1,6 +1,6 @@ import React from 'react'; import type {StyleProp, ViewStyle} from 'react-native'; -import {View} from 'react-native'; +import {PixelRatio, View} from 'react-native'; import LogoComponent from '@assets/images/expensify-wordmark.svg'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; @@ -36,7 +36,7 @@ function Breadcrumbs({breadcrumbs, style}: BreadcrumbsProps) { const theme = useTheme(); const styles = useThemeStyles(); const [primaryBreadcrumb, secondaryBreadcrumb] = breadcrumbs; - + const fontScale = PixelRatio.getFontScale() > CONST.LOGO_MAX_SCALE ? CONST.LOGO_MAX_SCALE : PixelRatio.getFontScale(); return ( {primaryBreadcrumb.type === CONST.BREADCRUMB_TYPE.ROOT ? ( @@ -47,8 +47,8 @@ function Breadcrumbs({breadcrumbs, style}: BreadcrumbsProps) { contentFit="contain" src={LogoComponent} fill={theme.text} - width={variables.lhnLogoWidth} - height={variables.lhnLogoHeight} + width={variables.lhnLogoWidth * fontScale} + height={variables.lhnLogoHeight * fontScale} /> } shouldShowEnvironmentBadge diff --git a/src/styles/index.ts b/src/styles/index.ts index 405a05cfce78..c672fdb8948c 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -1512,25 +1512,23 @@ const styles = (theme: ThemeColors) => }, breadcrumsContainer: { - height: 24, + minHeight: 24, }, breadcrumb: { color: theme.textSupporting, - fontSize: variables.fontSizeh1, - lineHeight: variables.lineHeightSizeh1, + fontSize: variables.breadcrumbsFontSize, ...headlineFont, }, breadcrumbStrong: { color: theme.text, - fontSize: variables.fontSizeXLarge, + fontSize: variables.breadcrumbsFontSize, }, breadcrumbSeparator: { color: theme.icon, - fontSize: variables.fontSizeXLarge, - lineHeight: variables.lineHeightSizeh1, + fontSize: variables.breadcrumbsFontSize, ...headlineFont, }, diff --git a/src/styles/variables.ts b/src/styles/variables.ts index 63611eccb199..d63fb5e9f339 100644 --- a/src/styles/variables.ts +++ b/src/styles/variables.ts @@ -47,6 +47,7 @@ export default { avatarSizeSmallSubscript: 12, defaultAvatarPreviewSize: 360, fabBottom: 25, + breadcrumbsFontSize: getValueUsingPixelRatio(19, 32), fontSizeOnlyEmojis: 30, fontSizeOnlyEmojisHeight: 35, fontSizeSmall: getValueUsingPixelRatio(11, 17),