From 5b905af5d3a3f48ef2ba88e6f33ee033e1e5af96 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Mon, 31 Jan 2022 21:50:16 +0100 Subject: [PATCH] auto-fix excessive font sizes - fixes #5542 --- .../src/components/appearanceSettingsTab.component.pug | 2 +- .../src/components/appearanceSettingsTab.component.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tabby-terminal/src/components/appearanceSettingsTab.component.pug b/tabby-terminal/src/components/appearanceSettingsTab.component.pug index 4c0b046d..83c9d5b5 100644 --- a/tabby-terminal/src/components/appearanceSettingsTab.component.pug +++ b/tabby-terminal/src/components/appearanceSettingsTab.component.pug @@ -17,7 +17,7 @@ h3.mb-3(translate) Appearance type='number', max='48', [(ngModel)]='config.store.terminal.fontSize', - (ngModelChange)='config.save()', + (ngModelChange)='fixFontSize(); config.save()', ) .form-line diff --git a/tabby-terminal/src/components/appearanceSettingsTab.component.ts b/tabby-terminal/src/components/appearanceSettingsTab.component.ts index e33c45c5..4671c594 100644 --- a/tabby-terminal/src/components/appearanceSettingsTab.component.ts +++ b/tabby-terminal/src/components/appearanceSettingsTab.component.ts @@ -42,4 +42,10 @@ export class AppearanceSettingsTabComponent { this.config.requestRestart() } } + + fixFontSize () { + if (this.config.store.terminal.fontSize > 100) { + this.config.store.terminal.fontSize = 12 + } + } }