mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -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 () {
|
||||
const state = getState();
|
||||
const old = state.ui.fontSizeOverride || state.ui.fontSize;
|
||||
const size = old + 1;
|
||||
const value = old + 1;
|
||||
dispatch({
|
||||
type: UI_FONT_SIZE_SET,
|
||||
size
|
||||
value
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -41,10 +41,10 @@ export function decreaseFontSize () {
|
|||
effect () {
|
||||
const state = getState();
|
||||
const old = state.ui.fontSizeOverride || state.ui.fontSize;
|
||||
const size = old + 1;
|
||||
const value = old - 1;
|
||||
dispatch({
|
||||
type: UI_FONT_SIZE_SET,
|
||||
size
|
||||
value
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const NotificationsContainer = connect(
|
|||
const state_ = {};
|
||||
|
||||
if (notifications.font) {
|
||||
const fontSize = ui.fontSize;
|
||||
const fontSize = ui.fontSizeOverride || ui.fontSize;
|
||||
|
||||
Object.assign(state_, {
|
||||
fontShowing: true,
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ rpc.on('increase fontSize req', () => {
|
|||
});
|
||||
|
||||
rpc.on('decrease fontSize req', () => {
|
||||
store_.dispatch(uiActions.resetFontSize());
|
||||
store_.dispatch(uiActions.decreaseFontSize());
|
||||
});
|
||||
|
||||
rpc.on('move left req', () => {
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ const reducer = (state = initial, action) => {
|
|||
break;
|
||||
|
||||
case UI_FONT_SIZE_SET:
|
||||
state_ = state.set('fontSizeOverride', state.value);
|
||||
state_ = state.set('fontSizeOverride', action.value);
|
||||
break;
|
||||
|
||||
case UI_FONT_SIZE_RESET:
|
||||
|
|
|
|||
Loading…
Reference in a new issue