Merge branch 'develop' into travis/granular-settings

This commit is contained in:
Travis Ralston 2017-11-13 12:29:36 -07:00
commit 0648b3eae7
14 changed files with 481 additions and 248 deletions

View file

@ -287,6 +287,9 @@ module.exports = React.createClass({
this._windowWidth = 10000;
this.handleResize();
window.addEventListener('resize', this.handleResize);
// check we have the right tint applied for this theme
Tinter.tint();
},
componentDidMount: function() {
@ -886,7 +889,7 @@ module.exports = React.createClass({
*/
_onSetTheme: function(theme) {
if (!theme) {
theme = 'light';
theme = this.props.config.default_theme || 'light';
}
// look for the stylesheet elements.
@ -915,6 +918,10 @@ module.exports = React.createClass({
});
styleElements[theme].disabled = false;
Tinter.setTheme(theme);
const colors = Tinter.getCurrentColors();
Tinter.tint(colors[0], colors[1]);
if (theme === 'dark') {
// abuse the tinter to change all the SVG's #fff to #2d2d2d
// XXX: obviously this shouldn't be hardcoded here.