From 36febb8b7e4a7de9a4dd0c4325b740f0b3863ba9 Mon Sep 17 00:00:00 2001 From: Mike Judge Date: Fri, 15 Feb 2019 15:27:19 -0800 Subject: [PATCH 1/3] Disable font scaling for the back button as a prequel to making it configurable --- src/views/Header/HeaderBackButton.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/Header/HeaderBackButton.js b/src/views/Header/HeaderBackButton.js index 1e6ac64..8272369 100644 --- a/src/views/Header/HeaderBackButton.js +++ b/src/views/Header/HeaderBackButton.js @@ -92,6 +92,7 @@ class HeaderBackButton extends React.PureComponent { onLayout={this._onTextLayout} style={[styles.title, !!tintColor && { color: tintColor }, titleStyle]} numberOfLines={1} + allowFontScaling={false} > {this._getTitleText()} From c1f1dff465e9eebe274a08e274cf10570045fa23 Mon Sep 17 00:00:00 2001 From: Mike Judge Date: Fri, 15 Feb 2019 15:40:06 -0800 Subject: [PATCH 2/3] Add support for HeaderBackAllowFontScaling --- src/views/Header/Header.js | 1 + src/views/Header/HeaderBackButton.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/Header/Header.js b/src/views/Header/Header.js index dd086e5..9b1912f 100644 --- a/src/views/Header/Header.js +++ b/src/views/Header/Header.js @@ -214,6 +214,7 @@ class Header extends React.PureComponent { title={backButtonTitle} truncatedTitle={truncatedBackButtonTitle} backTitleVisible={this.props.backTitleVisible} + allowFontScaling={options.headerBackAllowFontScaling} titleStyle={options.headerBackTitleStyle} layoutPreset={this.props.layoutPreset} width={width} diff --git a/src/views/Header/HeaderBackButton.js b/src/views/Header/HeaderBackButton.js index 8272369..505a726 100644 --- a/src/views/Header/HeaderBackButton.js +++ b/src/views/Header/HeaderBackButton.js @@ -79,7 +79,7 @@ class HeaderBackButton extends React.PureComponent { }; _maybeRenderTitle() { - const { backTitleVisible, titleStyle, tintColor } = this.props; + const { allowFontScaling, backTitleVisible, titleStyle, tintColor } = this.props; let backTitleText = this._getTitleText(); if (!backTitleVisible || backTitleText === null) { @@ -92,7 +92,7 @@ class HeaderBackButton extends React.PureComponent { onLayout={this._onTextLayout} style={[styles.title, !!tintColor && { color: tintColor }, titleStyle]} numberOfLines={1} - allowFontScaling={false} + allowFontScaling={allowFontScaling} > {this._getTitleText()} From 5531b987329502ca94101adf558212d5ca6c9bf0 Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Wed, 20 Feb 2019 12:46:45 -0800 Subject: [PATCH 3/3] Update HeaderBackButton.js --- src/views/Header/HeaderBackButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Header/HeaderBackButton.js b/src/views/Header/HeaderBackButton.js index 505a726..96d58bb 100644 --- a/src/views/Header/HeaderBackButton.js +++ b/src/views/Header/HeaderBackButton.js @@ -92,7 +92,7 @@ class HeaderBackButton extends React.PureComponent { onLayout={this._onTextLayout} style={[styles.title, !!tintColor && { color: tintColor }, titleStyle]} numberOfLines={1} - allowFontScaling={allowFontScaling} + allowFontScaling={!!allowFontScaling} > {this._getTitleText()}