diff --git a/docs/mac-os/title-bar.md b/docs/mac-os/title-bar.md index 47303e53..47340915 100644 --- a/docs/mac-os/title-bar.md +++ b/docs/mac-os/title-bar.md @@ -15,7 +15,8 @@ title | string | Sets the title of the title bar. transparent | bool | Make the title bar background transparent. disableClose | bool | Disable the close button. disableMinimize | bool | Disable the minimize button. -disableReize | bool | Disable the resize button. +disableResize | bool | Disable the resize button. +disableFullscreen | bool | Disable fullscreen, will show the '+' maximize icon instead. ### Examples diff --git a/src/TitleBar/macOs/Controls/Resize.js b/src/TitleBar/macOs/Controls/Resize.js index 0294d432..75bb4cf9 100644 --- a/src/TitleBar/macOs/Controls/Resize.js +++ b/src/TitleBar/macOs/Controls/Resize.js @@ -10,7 +10,8 @@ class Resize extends Component { static propTypes = { isFullscreen: PropTypes.bool, showIcon: PropTypes.bool, - disabled: PropTypes.bool + disabled: PropTypes.bool, + disableFullscreen: PropTypes.bool, }; componentDidMount() { @@ -34,6 +35,7 @@ class Resize extends Component { isWindowFocused, showIcon, disabled, + disableFullscreen, ...props } = this.props; @@ -53,7 +55,7 @@ class Resize extends Component { } let icon; - if (this.props.isFullscreen) { + if (this.props.isFullscreen && !disableFullscreen) { icon = window && window.devicePixelRatio > 1.5 ? ( @@ -65,7 +67,7 @@ class Resize extends Component { ); - } else if (this.state.altKey) { + } else if (this.state.altKey || disableFullscreen) { onClick = onMaximizeClick; icon = window && window.devicePixelRatio > 1.5 ? ( diff --git a/src/TitleBar/macOs/Controls/index.js b/src/TitleBar/macOs/Controls/index.js index 47032388..7b9bb292 100644 --- a/src/TitleBar/macOs/Controls/index.js +++ b/src/TitleBar/macOs/Controls/index.js @@ -28,7 +28,8 @@ class Controls extends Component { onResizeClick: PropTypes.func, disableClose: PropTypes.bool, disableMinimize: PropTypes.bool, - disableResize: PropTypes.bool + disableResize: PropTypes.bool, + disableFullscreen: PropTypes.bool }; constructor() { @@ -61,6 +62,7 @@ class Controls extends Component { onMaximizeClick={this.props.onMaximizeClick} showIcon={this.state.isOver} disabled={this.props.disableResize} + disableFullscreen={this.props.disableFullscreen} /> ); diff --git a/src/TitleBar/macOs/index.js b/src/TitleBar/macOs/index.js index 0e2753dd..1c5199b8 100644 --- a/src/TitleBar/macOs/index.js +++ b/src/TitleBar/macOs/index.js @@ -21,7 +21,8 @@ class TitleBar extends Component { onResizeClick: PropTypes.func, disableClose: PropTypes.bool, disableMinimize: PropTypes.bool, - disableResize: PropTypes.bool + disableResize: PropTypes.bool, + disableFullscreen: PropTypes.bool }; static childContextTypes = {