mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 23:35:59 +00:00
configurable editor font #308
This commit is contained in:
@@ -114,7 +114,13 @@
|
||||
import 'ace-builds/src-noconflict/theme-tomorrow_night';
|
||||
import 'ace-builds/src-noconflict/theme-twilight';
|
||||
|
||||
import { currentDropDownMenu, currentEditorFontSize, currentEditorTheme, currentThemeDefinition } from '../stores';
|
||||
import {
|
||||
currentDropDownMenu,
|
||||
currentEditorFontSize,
|
||||
currentEditorFont,
|
||||
currentEditorTheme,
|
||||
currentThemeDefinition,
|
||||
} from '../stores';
|
||||
import _ from 'lodash';
|
||||
import { handleCommandKeyDown } from '../commands/CommandListener.svelte';
|
||||
import resizeObserver from '../utility/resizeObserver';
|
||||
@@ -223,12 +229,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
$: watchOptions(options);
|
||||
function watchOptions(newOption: any) {
|
||||
$: watchOptions(options, $currentEditorFont);
|
||||
function watchOptions(newOption: any, fontFamily) {
|
||||
if (editor) {
|
||||
editor.setOptions({
|
||||
...stdOptions,
|
||||
...newOption,
|
||||
fontFamily: fontFamily || 'Menlo, Monaco, Ubuntu Mono, Consolas, source-code-pro, monospace',
|
||||
// fontFamily: 'tahoma,Menlo',
|
||||
// fontSize: '10pt',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user