mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
hyperterm: implement font size config
This commit is contained in:
parent
fcb221456d
commit
043c9c86da
1 changed files with 9 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ import shallowCompare from 'react-addons-shallow-compare';
|
|||
import React, { Component } from 'react';
|
||||
|
||||
export default class HyperTerm extends Component {
|
||||
constructor () {
|
||||
constructor (props) {
|
||||
super();
|
||||
this.state = {
|
||||
cols: null,
|
||||
|
|
@ -24,7 +24,7 @@ export default class HyperTerm extends Component {
|
|||
fontSizeIndicatorShowing: false,
|
||||
dismissedUpdate: false,
|
||||
updateVersion: null,
|
||||
fontSize: 12
|
||||
fontSize: props.config.fontSize
|
||||
};
|
||||
|
||||
// we set this to true when the first tab
|
||||
|
|
@ -56,6 +56,12 @@ export default class HyperTerm extends Component {
|
|||
this.onUpdateAvailable = this.onUpdateAvailable.bind(this);
|
||||
}
|
||||
|
||||
componentWillReceiveProps (props) {
|
||||
if (props.config.fontSize !== this.props.config.fontSize) {
|
||||
this.changeFontSize(props.config.fontSize);
|
||||
}
|
||||
}
|
||||
|
||||
render () {
|
||||
return <div onClick={ this.focusActive }>
|
||||
<div className={ classes('main', { mac: this.state.mac }) }>
|
||||
|
|
@ -328,7 +334,7 @@ export default class HyperTerm extends Component {
|
|||
}
|
||||
|
||||
resetFontSize () {
|
||||
this.changeFontSize(12);
|
||||
this.changeFontSize(this.props.config.fontSize);
|
||||
}
|
||||
|
||||
increaseFontSize () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue