diff --git a/ui/src/components/RttyTerm.vue b/ui/src/components/RttyTerm.vue
index 8c742cc..ed4b3df 100644
--- a/ui/src/components/RttyTerm.vue
+++ b/ui/src/components/RttyTerm.vue
@@ -12,9 +12,6 @@
-
-
-
@@ -53,7 +50,8 @@ export default {
{name: 'copy', caption: this.$t('Copy - Ctrl+Insert')},
{name: 'paste', caption: this.$t('Paste - Shift+Insert')},
{name: 'clear', caption: this.$t('Clear Scrollback')},
- {name: 'font', caption: this.$t('Font Size')},
+ {name: 'font+', caption: this.$t('font+')},
+ {name: 'font-', caption: this.$t('font-')},
{name: 'upload', caption: this.$t('Upload file') + ' - rtty -R'},
{name: 'download', caption: this.$t('Download file') + ' - rtty -S file'},
{name: 'split-left', caption: this.$t('split-left')},
@@ -63,10 +61,6 @@ export default {
{name: 'close', caption: this.$t('Close')},
{name: 'about', caption: this.$t('About')}
],
- font: {
- modal: false,
- size: 16
- },
file: {
modal: false,
accepted: false,
@@ -99,8 +93,10 @@ export default {
this.pasteFromClipboard()
} else if (name === 'clear') {
this.term.clear()
- } else if (name === 'font') {
- this.font.modal = true
+ } else if (name === 'font+') {
+ this.updateFontSize(1)
+ } else if (name === 'font-') {
+ this.updateFontSize(-1)
} else if (name === 'upload') {
this.$message.success(this.$t('Please execute command "rtty -R" in current terminal!'))
} else if (name === 'download') {
@@ -146,12 +142,7 @@ export default {
}
},
updateFontSize(size) {
- if (!size) {
- size = 16
- this.font.size = 16
- }
-
- this.term.options.fontSize = size
+ this.term.options.fontSize += size
this.fitAddon.fit()
},
onUploadDialogClosed() {
@@ -235,7 +226,7 @@ export default {
openTerm() {
const term = new Terminal({
cursorBlink: true,
- fontSize: this.font.size
+ fontSize: 16
})
this.term = term
@@ -386,8 +377,4 @@ export default {
:deep(.xterm .xterm-viewport) {
overflow-y: auto;
}
-
- :deep(.font-size-dialog-header) {
- display: none;
- }
diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json
index 70a0e7b..c7516b7 100644
--- a/ui/src/i18n/en.json
+++ b/ui/src/i18n/en.json
@@ -52,7 +52,8 @@
"Copy - Ctrl+Insert": "Copy - Ctrl+Insert",
"Paste - Shift+Insert": "Paste - Shift+Insert",
"Clear Scrollback": "Clear Scrollback",
- "Font Size": "Font Size",
+ "font+": "Increase font size",
+ "font-": "Decrease font size",
"Upload file": "Upload file",
"Download file": "Download file",
"split-left": "Split: Left",
diff --git a/ui/src/i18n/zh-CN.json b/ui/src/i18n/zh-CN.json
index 4378bed..461b5eb 100644
--- a/ui/src/i18n/zh-CN.json
+++ b/ui/src/i18n/zh-CN.json
@@ -53,7 +53,8 @@
"Copy - Ctrl+Insert": "复制 - Ctrl+Insert",
"Paste - Shift+Insert": "粘贴 - Shift+Insert",
"Clear Scrollback": "清除回滚",
- "Font Size": "字体大小",
+ "font+": "增大字号",
+ "font-": "减小字号",
"Upload file": "上传文件",
"Download file": "下载文件",
"split-left": "拆分窗格: 左",