mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 21:58:39 -09:00
fix font size keyboard shortcuts
This commit is contained in:
parent
2b0ca5a75b
commit
06be0e2fb1
4 changed files with 7 additions and 7 deletions
|
|
@ -24,10 +24,10 @@ export function increaseFontSize () {
|
||||||
effect () {
|
effect () {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const old = state.ui.fontSizeOverride || state.ui.fontSize;
|
const old = state.ui.fontSizeOverride || state.ui.fontSize;
|
||||||
const size = old + 1;
|
const value = old + 1;
|
||||||
dispatch({
|
dispatch({
|
||||||
type: UI_FONT_SIZE_SET,
|
type: UI_FONT_SIZE_SET,
|
||||||
size
|
value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -41,10 +41,10 @@ export function decreaseFontSize () {
|
||||||
effect () {
|
effect () {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const old = state.ui.fontSizeOverride || state.ui.fontSize;
|
const old = state.ui.fontSizeOverride || state.ui.fontSize;
|
||||||
const size = old + 1;
|
const value = old - 1;
|
||||||
dispatch({
|
dispatch({
|
||||||
type: UI_FONT_SIZE_SET,
|
type: UI_FONT_SIZE_SET,
|
||||||
size
|
value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ const NotificationsContainer = connect(
|
||||||
const state_ = {};
|
const state_ = {};
|
||||||
|
|
||||||
if (notifications.font) {
|
if (notifications.font) {
|
||||||
const fontSize = ui.fontSize;
|
const fontSize = ui.fontSizeOverride || ui.fontSize;
|
||||||
|
|
||||||
Object.assign(state_, {
|
Object.assign(state_, {
|
||||||
fontShowing: true,
|
fontShowing: true,
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ rpc.on('increase fontSize req', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
rpc.on('decrease fontSize req', () => {
|
rpc.on('decrease fontSize req', () => {
|
||||||
store_.dispatch(uiActions.resetFontSize());
|
store_.dispatch(uiActions.decreaseFontSize());
|
||||||
});
|
});
|
||||||
|
|
||||||
rpc.on('move left req', () => {
|
rpc.on('move left req', () => {
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ const reducer = (state = initial, action) => {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UI_FONT_SIZE_SET:
|
case UI_FONT_SIZE_SET:
|
||||||
state_ = state.set('fontSizeOverride', state.value);
|
state_ = state.set('fontSizeOverride', action.value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UI_FONT_SIZE_RESET:
|
case UI_FONT_SIZE_RESET:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue