Fixes #677
This commit is contained in:
parent
3b1cd6782b
commit
2475467dd0
3 changed files with 13 additions and 2 deletions
|
@ -23,6 +23,11 @@ class Console extends React.Component {
|
||||||
this.props.clearConsole();
|
this.props.clearConsole();
|
||||||
this.props.dispatchConsoleEvent(this.props.consoleEvents);
|
this.props.dispatchConsoleEvent(this.props.consoleEvents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.props.consoleFontSize !== prevProps.consoleFontSize){
|
||||||
|
this.props.clearConsole();
|
||||||
|
this.props.dispatchConsoleEvent(this.props.consoleEvents);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getConsoleFeedStyle(theme, times) {
|
getConsoleFeedStyle(theme, times) {
|
||||||
|
@ -31,13 +36,16 @@ class Console extends React.Component {
|
||||||
LOG_WARN_ICON: `url(${warnLightUrl})`,
|
LOG_WARN_ICON: `url(${warnLightUrl})`,
|
||||||
LOG_ERROR_ICON: `url(${errorLightUrl})`,
|
LOG_ERROR_ICON: `url(${errorLightUrl})`,
|
||||||
LOG_DEBUG_ICON: `url(${debugLightUrl})`,
|
LOG_DEBUG_ICON: `url(${debugLightUrl})`,
|
||||||
LOG_INFO_ICON: `url(${infoLightUrl})`
|
LOG_INFO_ICON: `url(${infoLightUrl})`,
|
||||||
|
BASE_FONT_SIZE: `${this.props.consoleFontSize}`
|
||||||
};
|
};
|
||||||
const CONSOLE_FEED_DARK_ICONS = {
|
const CONSOLE_FEED_DARK_ICONS = {
|
||||||
LOG_WARN_ICON: `url(${warnDarkUrl})`,
|
LOG_WARN_ICON: `url(${warnDarkUrl})`,
|
||||||
LOG_ERROR_ICON: `url(${errorDarkUrl})`,
|
LOG_ERROR_ICON: `url(${errorDarkUrl})`,
|
||||||
LOG_DEBUG_ICON: `url(${debugDarkUrl})`,
|
LOG_DEBUG_ICON: `url(${debugDarkUrl})`,
|
||||||
LOG_INFO_ICON: `url(${infoDarkUrl})`
|
LOG_INFO_ICON: `url(${infoDarkUrl})`,
|
||||||
|
BASE_FONT_SIZE: `${this.props.consoleFontSize}`
|
||||||
|
|
||||||
};
|
};
|
||||||
if (times > 1) {
|
if (times > 1) {
|
||||||
Object.assign(style, CONSOLE_FEED_WITHOUT_ICONS);
|
Object.assign(style, CONSOLE_FEED_WITHOUT_ICONS);
|
||||||
|
|
|
@ -131,6 +131,7 @@ class Preferences extends React.Component {
|
||||||
<InlineSVG src={plusUrl} alt="Increase Font Size" />
|
<InlineSVG src={plusUrl} alt="Increase Font Size" />
|
||||||
<h6 className="preference__label">Increase</h6>
|
<h6 className="preference__label">Increase</h6>
|
||||||
</button>
|
</button>
|
||||||
|
This will also change console font size
|
||||||
</div>
|
</div>
|
||||||
<div className="preference">
|
<div className="preference">
|
||||||
<h4 className="preference__title">Indentation amount</h4>
|
<h4 className="preference__title">Indentation amount</h4>
|
||||||
|
@ -332,6 +333,7 @@ class Preferences extends React.Component {
|
||||||
|
|
||||||
Preferences.propTypes = {
|
Preferences.propTypes = {
|
||||||
fontSize: PropTypes.number.isRequired,
|
fontSize: PropTypes.number.isRequired,
|
||||||
|
consoleFontSize: PropTypes.number.isRequired,
|
||||||
indentationAmount: PropTypes.number.isRequired,
|
indentationAmount: PropTypes.number.isRequired,
|
||||||
setIndentation: PropTypes.func.isRequired,
|
setIndentation: PropTypes.func.isRequired,
|
||||||
indentWithSpace: PropTypes.func.isRequired,
|
indentWithSpace: PropTypes.func.isRequired,
|
||||||
|
|
|
@ -357,6 +357,7 @@ class IDEView extends React.Component {
|
||||||
provideController={(ctl) => { this.cmController = ctl; }}
|
provideController={(ctl) => { this.cmController = ctl; }}
|
||||||
/>
|
/>
|
||||||
<Console
|
<Console
|
||||||
|
consoleFontSize={this.props.preferences.fontSize}
|
||||||
consoleEvents={this.props.console}
|
consoleEvents={this.props.console}
|
||||||
isExpanded={this.props.ide.consoleIsExpanded}
|
isExpanded={this.props.ide.consoleIsExpanded}
|
||||||
expandConsole={this.props.expandConsole}
|
expandConsole={this.props.expandConsole}
|
||||||
|
|
Loading…
Reference in a new issue