Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
✨ Add termFontSize setting
Browse files Browse the repository at this point in the history
  • Loading branch information
GitSquared committed Feb 4, 2019
1 parent 66d718b commit dc1bcee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/_boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ if (!fs.existsSync(settingsFile)) {
cwd: electron.app.getPath("userData"),
keyboard: "en-US",
theme: "tron",
termFontSize: 15,
audio: true,
extraAudio: false,
pingAddr: "1.1.1.1",
Expand Down
6 changes: 6 additions & 0 deletions src/_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,11 @@ window.openSettings = async () => {
${themes}
</select></td>
</tr>
<tr>
<td>termFontSize</td>
<td>Size of the terminal text in pixels</td>
<td><input type="number" id="settingsEditor-termFontSize" value="${window.settings.termFontSize}"></td>
</tr>
<tr>
<td>audio</td>
<td>Activate audio sound effects</td>
Expand Down Expand Up @@ -690,6 +695,7 @@ window.writeSettingsFile = () => {
env: document.getElementById("settingsEditor-env").value,
keyboard: document.getElementById("settingsEditor-keyboard").value,
theme: document.getElementById("settingsEditor-theme").value,
termFontSize: Number(document.getElementById("settingsEditor-termFontSize").value),
audio: (document.getElementById("settingsEditor-audio").value === "true"),
extraAudio: (document.getElementById("settingsEditor-extraAudio").value === "true"),
pingAddr: document.getElementById("settingsEditor-pingAddr").value,
Expand Down
2 changes: 1 addition & 1 deletion src/classes/terminal.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Terminal {
cursorStyle: window.theme.terminal.cursorStyle || "block",
allowTransparency: window.theme.terminal.allowTransparency || false,
fontFamily: window.theme.terminal.fontFamily || "Fira Mono",
fontSize: window.theme.terminal.fontSize || 15,
fontSize: window.theme.terminal.fontSize || window.settings.termFontSize || 15,
fontWeight: window.theme.terminal.fontWeight || "normal",
fontWeightBold: window.theme.terminal.fontWeightBold || "bold",
letterSpacing: window.theme.terminal.letterSpacing || 0,
Expand Down

0 comments on commit dc1bcee

Please sign in to comment.