Improve appearance of tray icon theme selection
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const ReactDOM = require('react-dom');
|
const ReactDOM = require('react-dom');
|
||||||
const {Button, Checkbox, Col, FormGroup, FormControl, ControlLabel, Grid, HelpBlock, Navbar, Row} = require('react-bootstrap');
|
const {Button, Checkbox, Col, FormGroup, FormControl, ControlLabel, Grid, HelpBlock, Navbar, Radio, Row} = require('react-bootstrap');
|
||||||
|
|
||||||
const {ipcRenderer, remote} = require('electron');
|
const {ipcRenderer, remote} = require('electron');
|
||||||
const AutoLaunch = require('auto-launch');
|
const AutoLaunch = require('auto-launch');
|
||||||
@@ -280,19 +280,32 @@ const SettingsPage = React.createClass({
|
|||||||
}
|
}
|
||||||
if (process.platform === 'linux') {
|
if (process.platform === 'linux') {
|
||||||
options.push(
|
options.push(
|
||||||
<FormGroup>
|
<FormGroup
|
||||||
<ControlLabel>{'Icon theme (Need to restart the application)'}</ControlLabel>
|
key='trayIconTheme'
|
||||||
<FormControl
|
style={{marginLeft: '20px'}}
|
||||||
componentClass='select'
|
|
||||||
key='inputTrayIconTheme'
|
|
||||||
ref='trayIconTheme'
|
|
||||||
value={this.state.trayIconTheme}
|
|
||||||
onChange={this.handleChangeTrayIconTheme}
|
|
||||||
>
|
>
|
||||||
<option value='light'>{'Light'}</option>
|
{'Icon theme: '}
|
||||||
<option value='dark'>{'Dark'}</option>
|
<Radio
|
||||||
</FormControl>
|
inline={true}
|
||||||
</FormGroup>);
|
name='trayIconTheme'
|
||||||
|
value='light'
|
||||||
|
defaultChecked={this.state.trayIconTheme === 'light' || this.state.trayIconTheme === ''}
|
||||||
|
onChange={() => {
|
||||||
|
this.setState({trayIconTheme: 'light'});
|
||||||
|
}}
|
||||||
|
>{'Light'}</Radio>
|
||||||
|
{' '}
|
||||||
|
<Radio
|
||||||
|
inline={true}
|
||||||
|
name='trayIconTheme'
|
||||||
|
value='dark'
|
||||||
|
defaultChecked={this.state.trayIconTheme === 'dark'}
|
||||||
|
onChange={() => {
|
||||||
|
this.setState({trayIconTheme: 'dark'});
|
||||||
|
}}
|
||||||
|
>{'Dark'}</Radio>
|
||||||
|
</FormGroup>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === 'linux') {
|
if (process.platform === 'linux') {
|
||||||
|
Reference in New Issue
Block a user