feat: replace xterm with flutter_alacritty for true industrial-grade rendering
This commit is contained in:
50
desktop/lib/src/terminal_config.dart
Normal file
50
desktop/lib/src/terminal_config.dart
Normal file
@@ -0,0 +1,50 @@
|
||||
import 'package:flutter_alacritty/flutter_alacritty.dart';
|
||||
|
||||
/// 将 [RttyTheme] 的工业终端配色映射为 flutter_alacritty 的 [TerminalConfig]。
|
||||
class RttyTerminalConfig {
|
||||
RttyTerminalConfig._();
|
||||
|
||||
static TerminalConfig build() {
|
||||
final defaults = TerminalConfig.defaults();
|
||||
return defaults.copyWith(
|
||||
colors: const TerminalColors(
|
||||
background: 0xFF0B0E11,
|
||||
foreground: 0xFFCBD5DF,
|
||||
selection: 0x553A6EA5,
|
||||
ansi: [
|
||||
0xFF0B0E11, // black
|
||||
0xFFE5534B, // red
|
||||
0xFF3DDC97, // green
|
||||
0xFFFFB454, // yellow
|
||||
0xFF5AB0FF, // blue
|
||||
0xFFD77BFF, // magenta
|
||||
0xFF4ED6E0, // cyan
|
||||
0xFFDDE6EE, // white
|
||||
0xFF4A5866, // bright black
|
||||
0xFFFF6B6B, // bright red
|
||||
0xFF6BFFC2, // bright green
|
||||
0xFFFFCE7A, // bright yellow
|
||||
0xFF82C4FF, // bright blue
|
||||
0xFFE8A6FF, // bright magenta
|
||||
0xFF82EDF4, // bright cyan
|
||||
0xFFFFFDF8, // bright white
|
||||
],
|
||||
searchMatchBg: 0xFFB45454,
|
||||
searchMatchFg: 0xFF14100A,
|
||||
searchFocusedBg: 0xFFFFB454,
|
||||
searchFocusedFg: 0xFF14100A,
|
||||
hintStartFg: 0xFF14100A,
|
||||
hintStartBg: 0xFFFFB454,
|
||||
cursorText: 0xFF06130D,
|
||||
cursorBody: 0xFF3DDC97,
|
||||
),
|
||||
font: const FontConfig(
|
||||
family: 'Consolas',
|
||||
fallback: ['Cascadia Mono', 'JetBrains Mono', 'Menlo', 'monospace'],
|
||||
size: 14.0,
|
||||
lineHeight: 1.15,
|
||||
),
|
||||
scrolling: defaults.scrolling.copyWith(history: 10000),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user