From 9aff04acf3e8b30816d82ed401f74fe276efaeb0 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Thu, 7 Jul 2016 17:25:56 -0700 Subject: [PATCH] hyperterm: set global background color --- app/hyperterm.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/hyperterm.js b/app/hyperterm.js index a910b0bd..b750f92c 100644 --- a/app/hyperterm.js +++ b/app/hyperterm.js @@ -54,18 +54,25 @@ export default class HyperTerm extends Component { this.dismissUpdate = this.dismissUpdate.bind(this); this.onUpdateAvailable = this.onUpdateAvailable.bind(this); + + document.body.style.backgroundColor = props.config.backgroundColor; } componentWillReceiveProps (props) { if (props.config.fontSize !== this.props.config.fontSize) { this.changeFontSize(props.config.fontSize); } + + if (props.config.backgroundColor !== this.props.config.backgroundColor) { + document.body.style.backgroundColor = props.config.backgroundColor; + } } render () { + const { backgroundColor } = this.props.config; return
-
+