Skip to content

Commit

Permalink
fix: editor font size doesn't change on new tabs, fixes #442
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Sep 15, 2022
1 parent 498a9b4 commit 84168d1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/renderer/components/QueryEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ const {
lineWrap
} = storeToRefs(settingsStore);
const sizes = {
small: '12px',
medium: '14px',
large: '16px'
};
const props = defineProps({
modelValue: String,
workspace: Object as Prop<Workspace>,
Expand Down Expand Up @@ -240,12 +246,6 @@ watch(editorTheme, () => {
});
watch(editorFontSize, () => {
const sizes = {
small: '12px',
medium: '14px',
large: '16px'
};
if (editor.value) {
editor.value.setOptions({
fontSize: sizes[editorFontSize.value]
Expand Down Expand Up @@ -305,7 +305,8 @@ onMounted(() => {
enableBasicAutocompletion: true,
wrap: lineWrap.value,
enableSnippets: true,
enableLiveAutocompletion: autoComplete.value
enableLiveAutocompletion: autoComplete.value,
fontSize: sizes[editorFontSize.value]
});
if (!baseCompleter.value.length)
Expand Down

0 comments on commit 84168d1

Please sign in to comment.