This commit is contained in:
lollipopkit
2023-05-13 19:40:18 +08:00
parent 91b2145c6e
commit d7c0be045a
6 changed files with 47 additions and 83 deletions

View File

@@ -2,8 +2,8 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 300;
static const int build = 306;
static const String engine = "3.10.0";
static const String buildAt = "2023-05-12 16:42:47.988995";
static const int modifications = 1;
static const String buildAt = "2023-05-12 22:39:42.911728";
static const int modifications = 5;
}

View File

@@ -2,10 +2,11 @@ import 'package:flutter/material.dart';
/// Font style
const textSize18 = TextStyle(fontSize: 18);
const textSize11 = TextStyle(fontSize: 11);
const textSize13 = TextStyle(fontSize: 13);
const textSize13Grey = TextStyle(color: Colors.grey, fontSize: 13);
const textSize15 = TextStyle(fontSize: 15);
const textSize18 = TextStyle(fontSize: 18);
const textSize27 = TextStyle(fontSize: 27);
const grey = TextStyle(color: Colors.grey);

View File

@@ -21,7 +21,6 @@ import '../../data/res/ui.dart';
import '../../data/store/setting.dart';
import '../../locator.dart';
import '../widget/future_widget.dart';
import '../widget/popup_menu.dart';
import '../widget/round_rect_card.dart';
class SettingPage extends StatefulWidget {
@@ -205,7 +204,7 @@ class _SettingPageState extends State<SettingPage> {
},
trailing: PopupMenuButton(
key: updateIntervalKey,
itemBuilder: (BuildContext context) => items,
itemBuilder: (_) => items,
initialValue: _updateInterval,
onSelected: (int val) {
setState(() {
@@ -219,6 +218,7 @@ class _SettingPageState extends State<SettingPage> {
},
child: Text(
'${_updateInterval.toInt()} ${_s.second}',
style: textSize15,
),
),
);
@@ -294,6 +294,7 @@ class _SettingPageState extends State<SettingPage> {
child: Text(
tabTitleName(context, _launchPageIdx),
textAlign: TextAlign.right,
style: textSize15,
),
),
),
@@ -328,6 +329,7 @@ class _SettingPageState extends State<SettingPage> {
},
child: Text(
TerminalColorsPlatform.values[_termThemeIdx].name,
style: textSize15,
),
),
);
@@ -366,6 +368,7 @@ class _SettingPageState extends State<SettingPage> {
},
child: Text(
'${_maxRetryCount.toInt()} ${_s.times}',
style: textSize15,
),
),
);
@@ -399,7 +402,10 @@ class _SettingPageState extends State<SettingPage> {
});
_setting.themeMode.put(_nightMode);
},
child: Text(_buildThemeModeStr(_nightMode)),
child: Text(
_buildThemeModeStr(_nightMode),
style: textSize15,
),
),
);
}
@@ -455,7 +461,10 @@ class _SettingPageState extends State<SettingPage> {
final fontName = getFileName(_setting.fontPath.fetch());
return ListTile(
title: Text(_s.choose),
trailing: Text(fontName ?? _s.notSelected),
trailing: Text(
fontName ?? _s.notSelected,
style: textSize15,
),
onTap: () {
showRoundDialog(
context: context,

View File

@@ -54,8 +54,9 @@ class _SSHPageState extends State<SSHPage> {
super.initState();
final termColorIdx = _setting.termColorIdx.fetch()!;
_termColors = TerminalColorsPlatform.values[termColorIdx].colors;
final ts = TextStyle(fontFamily: getFileName(_setting.fontPath.fetch()));
_terminalStyle = TerminalStyle.fromTextStyle(ts);
final fontFamilly = getFileName(_setting.fontPath.fetch());
final textStyle = TextStyle(fontFamily: fontFamilly);
_terminalStyle = TerminalStyle.fromTextStyle(textStyle);
initTerminal();
}
@@ -259,28 +260,28 @@ class _SSHPageState extends State<SSHPage> {
}
final selected = terminalSelected;
final children = <Widget>[
TextButton(
onPressed: () {
_paste();
},
child: Text(_s.paste),
),
TextButton(
onPressed: () {
_paste();
},
child: Text(_s.paste),
),
];
if (selected?.trim().isNotEmpty ?? false) {
children.add(
TextButton(
child: Text(
_s.copy,
style: _menuTextStyle,
TextButton(
child: Text(
_s.copy,
style: _menuTextStyle,
),
onPressed: () {
_terminalController.setSelection(null);
if (selected != null) {
copy2Clipboard(selected);
}
_menuController.remove();
},
),
onPressed: () {
_terminalController.setSelection(null);
if (selected != null) {
copy2Clipboard(selected);
}
_menuController.remove();
},
),
);
}
_menuController.show(