Remove min and max font setting

This commit is contained in:
Jorik Schellekens 2020-05-20 13:45:54 +01:00
parent 3e30df17fb
commit 55e72dd5bf
3 changed files with 8 additions and 17 deletions

View file

@ -18,6 +18,10 @@ import dis from './dispatcher';
import SettingsStore, {SettingLevel} from './settings/SettingsStore';
export class FontWatcher {
static minSize = 13;
static maxSize = 20;
constructor() {
this._dispatcherRef = null;
}
@ -38,10 +42,7 @@ export class FontWatcher {
};
_setRootFontSize = (size) => {
const min = SettingsStore.getValue("fontSizeMin");
const max = SettingsStore.getValue("fontSizeMax");
const fontSize = Math.max(Math.min(max, size), min);
const fontSize = Math.max(Math.min(this.maxSize, size), this.minSize);
if (fontSize != size) {
SettingsStore.setValue("fontSize", null, SettingLevel.Device, fontSize);