Remove min and max font setting
This commit is contained in:
parent
3e30df17fb
commit
55e72dd5bf
3 changed files with 8 additions and 17 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue