Skip to content

Commit

Permalink
opt.: term padding
Browse files Browse the repository at this point in the history
  • Loading branch information
lollipopkit committed Mar 13, 2024
1 parent 3747e2f commit 98bee2a
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion lib/data/store/setting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class SettingStore extends PersistentStore {
// SSH virtual key (ctrl | alt) auto turn off
late final sshVirtualKeyAutoOff = property('sshVirtualKeyAutoOff', true);

late final editorFontSize = property('editorFontSize', 13.0);
late final editorFontSize = property('editorFontSize', 12.5);

// Editor theme
late final editorTheme = property(
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"system": "Systeme",
"tag": "Tags",
"temperature": "Temperatur",
"termFontSizeTip": "Diese Einstellung beeinflusst die Größe des Terminals (Breite und Höhe).",
"termFontSizeTip": "Diese Einstellung beeinflusst die Größe des Terminals (Breite und Höhe). Sie können die Terminalseite zoomen, um die Schriftgröße der aktuellen Sitzung anzupassen.",
"terminal": "Terminal",
"test": "Prüfung",
"textScaler": "Skalierung der Schriftart",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"system": "System",
"tag": "Tags",
"temperature": "Temperature",
"termFontSizeTip": "This setting will affect the terminal size (width and height).",
"termFontSizeTip": "This setting will affect the terminal size (width and height). You can zoom in on the terminal page to adjust the font size of the current session.",
"terminal": "Terminal",
"test": "Test",
"textScaler": "Text scaler",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"system": "Sistema",
"tag": "Etiqueta",
"temperature": "Temperatura",
"termFontSizeTip": "Este ajuste afectará el tamaño del terminal (ancho y alto).",
"termFontSizeTip": "Este ajuste afectará el tamaño del terminal (ancho y alto). Puedes hacer zoom en la página del terminal para ajustar el tamaño de fuente de la sesión actual.",
"terminal": "Terminal",
"test": "Prueba",
"textScaler": "Escalar texto",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"system": "Système",
"tag": "Étiquettes",
"temperature": "Température",
"termFontSizeTip": "Ce paramètre affectera la taille du terminal (largeur et hauteur).",
"termFontSizeTip": "Ce paramètre affectera la taille du terminal (largeur et hauteur). Vous pouvez zoomer sur la page du terminal pour ajuster la taille de la police de la session en cours.",
"terminal": "Terminal",
"test": "Tester",
"textScaler": "Mise à l'échelle du texte",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_id.arb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"system": "Sistem",
"tag": "Tag",
"temperature": "Suhu",
"termFontSizeTip": "Pengaturan ini akan memengaruhi ukuran terminal (lebar dan tinggi).",
"termFontSizeTip": "Pengaturan ini akan memengaruhi ukuran terminal (lebar dan tinggi). Anda dapat melakukan zoom pada halaman terminal untuk menyesuaikan ukuran font sesi saat ini.",
"terminal": "Terminal",
"test": "pengujian",
"textScaler": "Penskalaan font",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"system": "システム",
"tag": "タグ",
"temperature": "温度",
"termFontSizeTip": "この設定は端末のサイズ(幅と高さ)に影響します",
"termFontSizeTip": "この設定は端末のサイズ(幅と高さ)に影響します。現在のセッションのフォントサイズを調整するために、端末ページを拡大縮小できます。",
"terminal": "ターミナル",
"test": "テスト",
"textScaler": "テキストスケーラー",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_pt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"system": "Sistema",
"tag": "Tag",
"temperature": "Temperatura",
"termFontSizeTip": "Esta configuração afetará o tamanho do terminal (largura e altura).",
"termFontSizeTip": "Esta configuração afetará o tamanho do terminal (largura e altura). Você pode dar zoom na página do terminal para ajustar o tamanho da fonte da sessão atual.",
"terminal": "Terminal",
"test": "Teste",
"textScaler": "Escala de texto",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"system": "система",
"tag": "тег",
"temperature": "температура",
"termFontSizeTip": "Эта настройка повлияет на размер терминала (ширина и высота).",
"termFontSizeTip": "Эта настройка повлияет на размер терминала (ширина и высота). Вы можете масштабировать страницу терминала, чтобы调整 размер шрифта текущей сессии.",
"terminal": "терминал",
"test": "тест",
"textScaler": "масштабирование текста",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"system": "系统",
"tag": "标签",
"temperature": "温度",
"termFontSizeTip": "此设置会影响终端大小(宽高)",
"termFontSizeTip": "此设置会影响终端大小(宽高)。可以在终端页面缩放来调整当前会话的字体大小",
"terminal": "终端",
"test": "测试",
"textScaler": "字体缩放",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_zh_tw.arb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"system": "系統",
"tag": "标签",
"temperature": "溫度",
"termFontSizeTip": "此設置將影響終端大小(寬度和高度)",
"termFontSizeTip": "此設置將影響終端大小(寬度和高度)。您可以在終端頁面縮放,來調整當前會話的字體大小。",
"terminal": "终端機",
"test": "測試",
"textScaler": "字體縮放",
Expand Down
17 changes: 8 additions & 9 deletions lib/view/page/setting/entry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ class _SettingPageState extends State<SettingPage> {
_buildFont(),
_buildTermFontSize(),
_buildSSHVirtualKeyAutoOff(),
// Use hardware keyboard on desktop, so there is no need to set it
if (isAndroid) _buildCNKeyboardComp(),
//if (isAndroid) _buildCNKeyboardComp(),
if (isMobile) _buildSSHVirtKeys(),
].map((e) => CardX(child: e)).toList(),
);
Expand Down Expand Up @@ -653,13 +652,13 @@ class _SettingPageState extends State<SettingPage> {
// );
// }

Widget _buildCNKeyboardComp() {
return ListTile(
title: Text(l10n.cnKeyboardComp),
subtitle: Text(l10n.cnKeyboardCompTip, style: UIs.textGrey),
trailing: StoreSwitch(prop: _setting.cnKeyboardComp),
);
}
// Widget _buildCNKeyboardComp() {
// return ListTile(
// title: Text(l10n.cnKeyboardComp),
// subtitle: Text(l10n.cnKeyboardCompTip, style: UIs.textGrey),
// trailing: StoreSwitch(prop: _setting.cnKeyboardComp),
// );
// }

Widget _buildSSHVirtKeys() {
return ListTile(
Expand Down
6 changes: 3 additions & 3 deletions lib/view/page/ssh/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ class _SSHPageState extends State<SSHPage> with AutomaticKeepAliveClientMixin {
_media.padding.top,
child: Padding(
padding: EdgeInsets.only(
top: CustomAppBar.barHeight ?? _media.padding.top,
top: CustomAppBar.barHeight ?? 0,
left: _horizonPadding,
right: _horizonPadding,
),
child: TerminalView(
_terminal,
controller: _terminalController,
keyboardType: TextInputType.emailAddress,
enableSuggestions: Stores.setting.cnKeyboardComp.fetch(),
enableSuggestions: true,
textStyle: _terminalStyle,
theme: _terminalTheme,
deleteDetection: isMobile,
Expand All @@ -148,7 +148,7 @@ class _SSHPageState extends State<SSHPage> with AutomaticKeepAliveClientMixin {
2 * _horizonPadding,
CustomAppBar.barHeight ?? _media.padding.top,
),
//hideScrollBar: false,
hideScrollBar: false,
),
),
);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ packages:
description:
path: "."
ref: master
resolved-ref: ee64dc1541a18f513856de0f554d8227fdbf29da
resolved-ref: "8f17dcbcafa9dc1b56cb3d7075dedfe0487d6a9b"
url: "https://github.com/lollipopkit/xterm.dart"
source: git
version: "4.0.0"
Expand Down

0 comments on commit 98bee2a

Please sign in to comment.