Add zooming functionality (#140)

This commit is contained in:
Gelaechter 2023-06-11 19:45:13 +00:00 committed by GitHub
parent 72099cb1fe
commit d7ca25525c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 74 additions and 4 deletions

View file

@ -95,6 +95,8 @@ export enum BindingActions {
TOGGLE_REPEAT = 'toggleRepeat',
VOLUME_DOWN = 'volumeDown',
VOLUME_UP = 'volumeUp',
ZOOM_IN = 'zoomIn',
ZOOM_OUT = 'zoomOut',
}
export interface SettingsState {
@ -116,6 +118,7 @@ export interface SettingsState {
themeDark: AppTheme;
themeLight: AppTheme;
volumeWheelStep: number;
zoomFactor: number;
};
hotkeys: {
bindings: Record<BindingActions, { allowGlobal: boolean; hotkey: string; isGlobal: boolean }>;
@ -185,6 +188,7 @@ const initialState: SettingsState = {
themeDark: AppTheme.DEFAULT_DARK,
themeLight: AppTheme.DEFAULT_LIGHT,
volumeWheelStep: 5,
zoomFactor: 100,
},
hotkeys: {
bindings: {
@ -205,6 +209,8 @@ const initialState: SettingsState = {
volumeDown: { allowGlobal: true, hotkey: '', isGlobal: false },
volumeMute: { allowGlobal: true, hotkey: '', isGlobal: false },
volumeUp: { allowGlobal: true, hotkey: '', isGlobal: false },
zoomIn: { allowGlobal: true, hotkey: '', isGlobal: false },
zoomOut: { allowGlobal: true, hotkey: '', isGlobal: false },
},
globalMediaHotkeys: true,
},