Show "Hide menubar" option on Linux

This commit is contained in:
Yuya Ochiai
2016-01-23 21:33:50 +09:00
parent f279c0c91d
commit 56e8b4fe9a

View File

@@ -37,7 +37,7 @@ var SettingsPage = React.createClass({
version: settings.version version: settings.version
}; };
settings.writeFileSync(this.props.configFile, config); settings.writeFileSync(this.props.configFile, config);
if (process.platform === 'win32') { if (process.platform === 'win32' || process.platform === 'linux') {
var currentWindow = remote.getCurrentWindow(); var currentWindow = remote.getCurrentWindow();
currentWindow.setAutoHideMenuBar(config.hideMenuBar); currentWindow.setAutoHideMenuBar(config.hideMenuBar);
currentWindow.setMenuBarVisibility(!config.hideMenuBar); currentWindow.setMenuBarVisibility(!config.hideMenuBar);
@@ -63,7 +63,7 @@ var SettingsPage = React.createClass({
); );
var options = []; var options = [];
if (process.platform === 'win32') { if (process.platform === 'win32' || process.platform === 'linux') {
options.push(<Input ref="hideMenuBar" type="checkbox" label="Hide menubar (Press Alt to show menubar)" checked={ this.state.hideMenuBar } onChange={ this.handleChangeHideMenuBar } />); options.push(<Input ref="hideMenuBar" type="checkbox" label="Hide menubar (Press Alt to show menubar)" checked={ this.state.hideMenuBar } onChange={ this.handleChangeHideMenuBar } />);
} }
var options_row = (options.length > 0) ? ( var options_row = (options.length > 0) ? (