|
1 | 1 | const React = require('react'); |
2 | | -const {Button, Checkbox, Col, FormGroup, Grid, Navbar, Row} = require('react-bootstrap'); |
| 2 | +const ReactDOM = require('react-dom'); |
| 3 | +const {Button, Checkbox, Col, FormGroup, FormControl, ControlLabel, Grid, Navbar, Row} = require('react-bootstrap'); |
3 | 4 |
|
4 | 5 | const {ipcRenderer, remote} = require('electron'); |
5 | 6 | const AutoLaunch = require('auto-launch'); |
@@ -114,7 +115,7 @@ const SettingsPage = React.createClass({ |
114 | 115 | }, |
115 | 116 | handleChangeTrayIconTheme() { |
116 | 117 | this.setState({ |
117 | | - trayIconTheme: !this.refs.trayIconTheme.props.checked |
| 118 | + trayIconTheme: ReactDOM.findDOMNode(this.refs.trayIconTheme).value |
118 | 119 | }); |
119 | 120 | }, |
120 | 121 | handleChangeAutoStart() { |
@@ -189,16 +190,19 @@ const SettingsPage = React.createClass({ |
189 | 190 | } |
190 | 191 | if (process.platform === 'linux') { |
191 | 192 | options.push( |
192 | | - <Checkbox |
193 | | - key='inputTrayIconTheme' |
194 | | - ref='trayIconTheme' |
195 | | - type='select' |
196 | | - value={this.state.trayIconTheme} |
197 | | - onChange={this.handleChangeTrayIconTheme} |
198 | | - >{'Icon theme (Need to restart the application)'} |
199 | | - <option value='light'>{'Light'}</option> |
200 | | - <option value='dark'>{'Dark'}</option> |
201 | | - </Checkbox>); |
| 193 | + <FormGroup> |
| 194 | + <ControlLabel>{'Icon theme (Need to restart the application)'}</ControlLabel> |
| 195 | + <FormControl |
| 196 | + componentClass='select' |
| 197 | + key='inputTrayIconTheme' |
| 198 | + ref='trayIconTheme' |
| 199 | + value={this.state.trayIconTheme} |
| 200 | + onChange={this.handleChangeTrayIconTheme} |
| 201 | + > |
| 202 | + <option value='light'>{'Light'}</option> |
| 203 | + <option value='dark'>{'Dark'}</option> |
| 204 | + </FormControl> |
| 205 | + </FormGroup>); |
202 | 206 | } |
203 | 207 | options.push( |
204 | 208 | <Checkbox |
|
0 commit comments