CONSTANT_CASING
This commit is contained in:
parent
adec5a4f92
commit
50a44405f0
2 changed files with 5 additions and 5 deletions
|
@ -18,8 +18,8 @@ import dis from './dispatcher/dispatcher';
|
||||||
import SettingsStore, {SettingLevel} from './settings/SettingsStore';
|
import SettingsStore, {SettingLevel} from './settings/SettingsStore';
|
||||||
|
|
||||||
export class FontWatcher {
|
export class FontWatcher {
|
||||||
static minSize = 13;
|
static MIN_SIZE = 13;
|
||||||
static maxSize = 20;
|
static MAX_SIZE = 20;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this._dispatcherRef = null;
|
this._dispatcherRef = null;
|
||||||
|
@ -41,7 +41,7 @@ export class FontWatcher {
|
||||||
};
|
};
|
||||||
|
|
||||||
_setRootFontSize = (size) => {
|
_setRootFontSize = (size) => {
|
||||||
const fontSize = Math.max(Math.min(FontWatcher.maxSize, size), FontWatcher.minSize);
|
const fontSize = Math.max(Math.min(FontWatcher.MAX_SIZE, size), FontWatcher.MIN_SIZE);
|
||||||
|
|
||||||
if (fontSize != size) {
|
if (fontSize != size) {
|
||||||
SettingsStore.setValue("fontSize", null, SettingLevel.Device, fontSize);
|
SettingsStore.setValue("fontSize", null, SettingLevel.Device, fontSize);
|
||||||
|
|
|
@ -109,8 +109,8 @@ export default class AppearanceUserSettingsTab extends React.Component {
|
||||||
console.log({value});
|
console.log({value});
|
||||||
|
|
||||||
const parsedSize = parseFloat(value);
|
const parsedSize = parseFloat(value);
|
||||||
const min = FontWatcher.minSize;
|
const min = FontWatcher.MIN_SIZE;
|
||||||
const max = FontWatcher.maxSize;
|
const max = FontWatcher.MAX_SIZE;
|
||||||
|
|
||||||
if (isNaN(parsedSize)) {
|
if (isNaN(parsedSize)) {
|
||||||
return {valid: false, feedback: _t("Size must be a number")};
|
return {valid: false, feedback: _t("Size must be a number")};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue