diff options
author | bobzel <zzzman@gmail.com> | 2020-08-05 16:15:48 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-05 16:15:48 -0400 |
commit | 38b33d2891a5e07de450015bcf4d34ae334c292d (patch) | |
tree | 05e1291206fe3bad4829fa5cae6b1b4bb752d00a /src | |
parent | 0d6a6991ae39406f80530bcaaa6e5b328bd64b67 (diff) |
fixed display of fontsizes in richtexts dropdownmenu
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/SettingsManager.tsx | 6 | ||||
-rw-r--r-- | src/client/views/nodes/formattedText/RichTextMenu.tsx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx index fce28a466..68ed32c0f 100644 --- a/src/client/util/SettingsManager.tsx +++ b/src/client/util/SettingsManager.tsx @@ -203,7 +203,7 @@ export default class SettingsManager extends React.Component<{}> { </div>; const fontFamilies: string[] = ["Times New Roman", "Arial", "Georgia", "Comic Sans MS", "Tahoma", "Impact", "Crimson Text"]; - const fontSizes: number[] = [7, 8, 9, 10, 12, 14, 16, 18, 20, 24, 32, 48, 72]; + const fontSizes: string[] = ["7pt", "8pt", "9pt", "10pt", "12pt", "14pt", "16pt", "18pt", "20pt", "24pt", "32pt", "48pt", "72pt"]; const preferencesContent = <div className="preferences-content"> <div className="preferences-color"> @@ -222,8 +222,8 @@ export default class SettingsManager extends React.Component<{}> { <select className="size-select" onChange={e => this.changeFontSize(e)}> {fontSizes.map((size) => { - return <option key={size} value={size} selected={NumCast(Doc.UserDoc().fontSize) === size}> - {size + "pt"} + return <option key={size} value={size} selected={StrCast(Doc.UserDoc().fontSize) === size}> + {size} </option>; })} </select> diff --git a/src/client/views/nodes/formattedText/RichTextMenu.tsx b/src/client/views/nodes/formattedText/RichTextMenu.tsx index 6e268be48..f040cd26d 100644 --- a/src/client/views/nodes/formattedText/RichTextMenu.tsx +++ b/src/client/views/nodes/formattedText/RichTextMenu.tsx @@ -274,7 +274,7 @@ export default class RichTextMenu extends AntimodeMenu { } !activeFamilies.length && (activeFamilies.push(StrCast(this.TextView.layoutDoc._fontFamily, StrCast(Doc.UserDoc().fontFamily)))); !activeSizes.length && (activeSizes.push(StrCast(this.TextView.layoutDoc._fontSize, StrCast(Doc.UserDoc().fontSize)))); - !activeColors.length && (activeSizes.push(StrCast(this.TextView.layoutDoc.color, StrCast(Doc.UserDoc().fontColor)))); + !activeColors.length && (activeColors.push(StrCast(this.TextView.layoutDoc.color, StrCast(Doc.UserDoc().fontColor)))); } !activeFamilies.length && (activeFamilies.push(StrCast(Doc.UserDoc().fontFamily))); !activeSizes.length && (activeSizes.push(StrCast(Doc.UserDoc().fontSize))); |