Merge pull request #87 from substantial/add-back-font-scaling
iOS Accessibility - add headerBackAllowFontScaling option
This commit is contained in:
commit
77d95131a0
|
@ -214,6 +214,7 @@ class Header extends React.PureComponent {
|
||||||
title={backButtonTitle}
|
title={backButtonTitle}
|
||||||
truncatedTitle={truncatedBackButtonTitle}
|
truncatedTitle={truncatedBackButtonTitle}
|
||||||
backTitleVisible={this.props.backTitleVisible}
|
backTitleVisible={this.props.backTitleVisible}
|
||||||
|
allowFontScaling={options.headerBackAllowFontScaling}
|
||||||
titleStyle={options.headerBackTitleStyle}
|
titleStyle={options.headerBackTitleStyle}
|
||||||
layoutPreset={this.props.layoutPreset}
|
layoutPreset={this.props.layoutPreset}
|
||||||
width={width}
|
width={width}
|
||||||
|
|
|
@ -79,7 +79,7 @@ class HeaderBackButton extends React.PureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
_maybeRenderTitle() {
|
_maybeRenderTitle() {
|
||||||
const { backTitleVisible, titleStyle, tintColor } = this.props;
|
const { allowFontScaling, backTitleVisible, titleStyle, tintColor } = this.props;
|
||||||
let backTitleText = this._getTitleText();
|
let backTitleText = this._getTitleText();
|
||||||
|
|
||||||
if (!backTitleVisible || backTitleText === null) {
|
if (!backTitleVisible || backTitleText === null) {
|
||||||
|
@ -92,6 +92,7 @@ class HeaderBackButton extends React.PureComponent {
|
||||||
onLayout={this._onTextLayout}
|
onLayout={this._onTextLayout}
|
||||||
style={[styles.title, !!tintColor && { color: tintColor }, titleStyle]}
|
style={[styles.title, !!tintColor && { color: tintColor }, titleStyle]}
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
|
allowFontScaling={!!allowFontScaling}
|
||||||
>
|
>
|
||||||
{this._getTitleText()}
|
{this._getTitleText()}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
Loading…
Reference in New Issue