mirror of https://github.com/Fabio286/antares.git
fix: editor font size doesn't change on new tabs, fixes #442
This commit is contained in:
parent
498a9b48e2
commit
84168d1d75
|
@ -34,6 +34,12 @@ const {
|
||||||
lineWrap
|
lineWrap
|
||||||
} = storeToRefs(settingsStore);
|
} = storeToRefs(settingsStore);
|
||||||
|
|
||||||
|
const sizes = {
|
||||||
|
small: '12px',
|
||||||
|
medium: '14px',
|
||||||
|
large: '16px'
|
||||||
|
};
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: String,
|
modelValue: String,
|
||||||
workspace: Object as Prop<Workspace>,
|
workspace: Object as Prop<Workspace>,
|
||||||
|
@ -240,12 +246,6 @@ watch(editorTheme, () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(editorFontSize, () => {
|
watch(editorFontSize, () => {
|
||||||
const sizes = {
|
|
||||||
small: '12px',
|
|
||||||
medium: '14px',
|
|
||||||
large: '16px'
|
|
||||||
};
|
|
||||||
|
|
||||||
if (editor.value) {
|
if (editor.value) {
|
||||||
editor.value.setOptions({
|
editor.value.setOptions({
|
||||||
fontSize: sizes[editorFontSize.value]
|
fontSize: sizes[editorFontSize.value]
|
||||||
|
@ -305,7 +305,8 @@ onMounted(() => {
|
||||||
enableBasicAutocompletion: true,
|
enableBasicAutocompletion: true,
|
||||||
wrap: lineWrap.value,
|
wrap: lineWrap.value,
|
||||||
enableSnippets: true,
|
enableSnippets: true,
|
||||||
enableLiveAutocompletion: autoComplete.value
|
enableLiveAutocompletion: autoComplete.value,
|
||||||
|
fontSize: sizes[editorFontSize.value]
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!baseCompleter.value.length)
|
if (!baseCompleter.value.length)
|
||||||
|
|
Loading…
Reference in New Issue