From 98bee2aae7c9ced28fe0684924520667d352c974 Mon Sep 17 00:00:00 2001 From: lollipopkit Date: Tue, 12 Mar 2024 23:08:27 -0600 Subject: [PATCH] opt.: term padding --- lib/data/store/setting.dart | 2 +- lib/l10n/app_de.arb | 2 +- lib/l10n/app_en.arb | 2 +- lib/l10n/app_es.arb | 2 +- lib/l10n/app_fr.arb | 2 +- lib/l10n/app_id.arb | 2 +- lib/l10n/app_ja.arb | 2 +- lib/l10n/app_pt.arb | 2 +- lib/l10n/app_ru.arb | 2 +- lib/l10n/app_zh.arb | 2 +- lib/l10n/app_zh_tw.arb | 2 +- lib/view/page/setting/entry.dart | 17 ++++++++--------- lib/view/page/ssh/page.dart | 6 +++--- pubspec.lock | 2 +- 14 files changed, 23 insertions(+), 24 deletions(-) diff --git a/lib/data/store/setting.dart b/lib/data/store/setting.dart index 7bdbd9df1..65f71c3ab 100644 --- a/lib/data/store/setting.dart +++ b/lib/data/store/setting.dart @@ -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( diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index ea6876d46..e80cb3097 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -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", diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index b89245bc3..55b87ade0 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -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", diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index ccb3d975c..43f6ef173 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -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", diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index fa4da81e8..6babd5244 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -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", diff --git a/lib/l10n/app_id.arb b/lib/l10n/app_id.arb index f8a6f03f6..d5b17185e 100644 --- a/lib/l10n/app_id.arb +++ b/lib/l10n/app_id.arb @@ -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", diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb index 5fe7997e1..9c841a64a 100644 --- a/lib/l10n/app_ja.arb +++ b/lib/l10n/app_ja.arb @@ -246,7 +246,7 @@ "system": "システム", "tag": "タグ", "temperature": "温度", - "termFontSizeTip": "この設定は端末のサイズ(幅と高さ)に影響します", + "termFontSizeTip": "この設定は端末のサイズ(幅と高さ)に影響します。現在のセッションのフォントサイズを調整するために、端末ページを拡大縮小できます。", "terminal": "ターミナル", "test": "テスト", "textScaler": "テキストスケーラー", diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb index 4ef754523..1b9734450 100644 --- a/lib/l10n/app_pt.arb +++ b/lib/l10n/app_pt.arb @@ -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", diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb index b37dc255a..34d7b2179 100644 --- a/lib/l10n/app_ru.arb +++ b/lib/l10n/app_ru.arb @@ -246,7 +246,7 @@ "system": "система", "tag": "тег", "temperature": "температура", - "termFontSizeTip": "Эта настройка повлияет на размер терминала (ширина и высота).", + "termFontSizeTip": "Эта настройка повлияет на размер терминала (ширина и высота). Вы можете масштабировать страницу терминала, чтобы调整 размер шрифта текущей сессии.", "terminal": "терминал", "test": "тест", "textScaler": "масштабирование текста", diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 64a2ecc0b..6a8809812 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -246,7 +246,7 @@ "system": "系统", "tag": "标签", "temperature": "温度", - "termFontSizeTip": "此设置会影响终端大小(宽高)", + "termFontSizeTip": "此设置会影响终端大小(宽高)。可以在终端页面缩放来调整当前会话的字体大小", "terminal": "终端", "test": "测试", "textScaler": "字体缩放", diff --git a/lib/l10n/app_zh_tw.arb b/lib/l10n/app_zh_tw.arb index e97f4fe4a..e3bb85411 100644 --- a/lib/l10n/app_zh_tw.arb +++ b/lib/l10n/app_zh_tw.arb @@ -246,7 +246,7 @@ "system": "系統", "tag": "标签", "temperature": "溫度", - "termFontSizeTip": "此設置將影響終端大小(寬度和高度)", + "termFontSizeTip": "此設置將影響終端大小(寬度和高度)。您可以在終端頁面縮放,來調整當前會話的字體大小。", "terminal": "终端機", "test": "測試", "textScaler": "字體縮放", diff --git a/lib/view/page/setting/entry.dart b/lib/view/page/setting/entry.dart index d36a43edb..19e12c9b7 100644 --- a/lib/view/page/setting/entry.dart +++ b/lib/view/page/setting/entry.dart @@ -172,8 +172,7 @@ class _SettingPageState extends State { _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(), ); @@ -653,13 +652,13 @@ class _SettingPageState extends State { // ); // } - 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( diff --git a/lib/view/page/ssh/page.dart b/lib/view/page/ssh/page.dart index 0a29f1e27..2ee1c72f6 100644 --- a/lib/view/page/ssh/page.dart +++ b/lib/view/page/ssh/page.dart @@ -129,7 +129,7 @@ class _SSHPageState extends State with AutomaticKeepAliveClientMixin { _media.padding.top, child: Padding( padding: EdgeInsets.only( - top: CustomAppBar.barHeight ?? _media.padding.top, + top: CustomAppBar.barHeight ?? 0, left: _horizonPadding, right: _horizonPadding, ), @@ -137,7 +137,7 @@ class _SSHPageState extends State with AutomaticKeepAliveClientMixin { _terminal, controller: _terminalController, keyboardType: TextInputType.emailAddress, - enableSuggestions: Stores.setting.cnKeyboardComp.fetch(), + enableSuggestions: true, textStyle: _terminalStyle, theme: _terminalTheme, deleteDetection: isMobile, @@ -148,7 +148,7 @@ class _SSHPageState extends State with AutomaticKeepAliveClientMixin { 2 * _horizonPadding, CustomAppBar.barHeight ?? _media.padding.top, ), - //hideScrollBar: false, + hideScrollBar: false, ), ), ); diff --git a/pubspec.lock b/pubspec.lock index f3145cbc1..00e969522 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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"