mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 13:48:41 -09:00
add configurable uifontfamily (#1549)
* add configurable uifontfamily * rm uifontfamily config default * fix uifontfamily conf default
This commit is contained in:
parent
21bd2a7bf1
commit
ade9ad39fd
8 changed files with 18 additions and 11 deletions
|
|
@ -196,11 +196,7 @@ export default class Header extends Component {
|
||||||
},
|
},
|
||||||
|
|
||||||
appTitle: {
|
appTitle: {
|
||||||
fontSize: '12px',
|
fontSize: '12px'
|
||||||
fontFamily: `-apple-system, BlinkMacSystemFont,
|
|
||||||
"Segoe UI", "Roboto", "Oxygen",
|
|
||||||
"Ubuntu", "Cantarell", "Fira Sans",
|
|
||||||
"Droid Sans", "Helvetica Neue", sans-serif`
|
|
||||||
},
|
},
|
||||||
|
|
||||||
shape: {
|
shape: {
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,6 @@ export default class Tabs extends Component {
|
||||||
return {
|
return {
|
||||||
nav: {
|
nav: {
|
||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
fontFamily: `-apple-system, BlinkMacSystemFont,
|
|
||||||
"Segoe UI", "Roboto", "Oxygen",
|
|
||||||
"Ubuntu", "Cantarell", "Fira Sans",
|
|
||||||
"Droid Sans", "Helvetica Neue", sans-serif`,
|
|
||||||
height: '34px',
|
height: '34px',
|
||||||
lineHeight: '34px',
|
lineHeight: '34px',
|
||||||
verticalAlign: 'middle',
|
verticalAlign: 'middle',
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ class TermGroup_ extends Component {
|
||||||
cursorShape: this.props.cursorShape,
|
cursorShape: this.props.cursorShape,
|
||||||
cursorBlink: this.props.cursorBlink,
|
cursorBlink: this.props.cursorBlink,
|
||||||
fontFamily: this.props.fontFamily,
|
fontFamily: this.props.fontFamily,
|
||||||
|
uiFontFamily: this.props.uiFontFamily,
|
||||||
fontSmoothing: this.props.fontSmoothing,
|
fontSmoothing: this.props.fontSmoothing,
|
||||||
foregroundColor: this.props.foregroundColor,
|
foregroundColor: this.props.foregroundColor,
|
||||||
backgroundColor: this.props.backgroundColor,
|
backgroundColor: this.props.backgroundColor,
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,7 @@ export default class Terms extends Component {
|
||||||
cursorShape: this.props.cursorShape,
|
cursorShape: this.props.cursorShape,
|
||||||
cursorBlink: this.props.cursorBlink,
|
cursorBlink: this.props.cursorBlink,
|
||||||
fontFamily: this.props.fontFamily,
|
fontFamily: this.props.fontFamily,
|
||||||
|
uiFontFamily: this.props.uiFontFamily,
|
||||||
fontSmoothing: this.props.fontSmoothing,
|
fontSmoothing: this.props.fontSmoothing,
|
||||||
foregroundColor: this.props.foregroundColor,
|
foregroundColor: this.props.foregroundColor,
|
||||||
backgroundColor: this.props.backgroundColor,
|
backgroundColor: this.props.backgroundColor,
|
||||||
|
|
|
||||||
|
|
@ -97,13 +97,13 @@ class Hyper extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
template(css) {
|
template(css) {
|
||||||
const {isMac, customCSS, borderColor, maximized} = this.props;
|
const {isMac, customCSS, uiFontFamily, borderColor, maximized} = this.props;
|
||||||
const borderWidth = isMac ? '' :
|
const borderWidth = isMac ? '' :
|
||||||
`${maximized ? '0' : '1'}px`;
|
`${maximized ? '0' : '1'}px`;
|
||||||
|
|
||||||
return (<div>
|
return (<div>
|
||||||
<div
|
<div
|
||||||
style={{borderColor, borderWidth}}
|
style={{fontFamily: uiFontFamily, borderColor, borderWidth}}
|
||||||
className={css('main', isMac && 'mainRounded')}
|
className={css('main', isMac && 'mainRounded')}
|
||||||
>
|
>
|
||||||
<HeaderContainer/>
|
<HeaderContainer/>
|
||||||
|
|
@ -140,6 +140,7 @@ const HyperContainer = connect(
|
||||||
return {
|
return {
|
||||||
isMac,
|
isMac,
|
||||||
customCSS: state.ui.css,
|
customCSS: state.ui.css,
|
||||||
|
uiFontFamily: state.ui.uiFontFamily,
|
||||||
borderColor: state.ui.borderColor,
|
borderColor: state.ui.borderColor,
|
||||||
activeSession: state.sessions.activeUid,
|
activeSession: state.sessions.activeUid,
|
||||||
backgroundColor: state.ui.backgroundColor,
|
backgroundColor: state.ui.backgroundColor,
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ const TermsContainer = connect(
|
||||||
state.ui.fontSizeOverride :
|
state.ui.fontSizeOverride :
|
||||||
state.ui.fontSize,
|
state.ui.fontSize,
|
||||||
fontFamily: state.ui.fontFamily,
|
fontFamily: state.ui.fontFamily,
|
||||||
|
uiFontFamily: state.ui.uiFontFamily,
|
||||||
fontSmoothing: state.ui.fontSmoothingOverride,
|
fontSmoothing: state.ui.fontSmoothingOverride,
|
||||||
padding: state.ui.padding,
|
padding: state.ui.padding,
|
||||||
cursorColor: state.ui.cursorColor,
|
cursorColor: state.ui.cursorColor,
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ const initial = Immutable({
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
padding: '12px 14px',
|
padding: '12px 14px',
|
||||||
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
|
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
|
||||||
|
uiFontFamily: null,
|
||||||
fontSizeOverride: null,
|
fontSizeOverride: null,
|
||||||
fontSmoothingOverride: 'antialiased',
|
fontSmoothingOverride: 'antialiased',
|
||||||
css: '',
|
css: '',
|
||||||
|
|
@ -119,6 +120,10 @@ const reducer = (state = initial, action) => {
|
||||||
ret.fontFamily = config.fontFamily;
|
ret.fontFamily = config.fontFamily;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.uiFontFamily) {
|
||||||
|
ret.uiFontFamily = config.uiFontFamily;
|
||||||
|
}
|
||||||
|
|
||||||
if (config.cursorColor) {
|
if (config.cursorColor) {
|
||||||
ret.cursorColor = config.cursorColor;
|
ret.cursorColor = config.cursorColor;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -700,6 +700,12 @@
|
||||||
<td>"Menlo, DejaVu Sans Mono, Lucida Console, monospace"</td>
|
<td>"Menlo, DejaVu Sans Mono, Lucida Console, monospace"</td>
|
||||||
<td>The font family to use with optional fallbacks</td>
|
<td>The font family to use with optional fallbacks</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>"uiFontFamily"</td>
|
||||||
|
<td>"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, ..."</td>
|
||||||
|
<td>The font family to use for the UI with optional fallbacks</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>"cursorColor"</td>
|
<td>"cursorColor"</td>
|
||||||
<td>"#F81CE5"</td>
|
<td>"#F81CE5"</td>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue