Просмотр исходного кода

fix!: use computed pixel size instead of actual pixel size

michaellee8 4 лет назад
Родитель
Сommit
3722f49028
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      lib/frontend/terminal_view.dart

+ 6 - 2
lib/frontend/terminal_view.dart

@@ -310,8 +310,12 @@ class _TerminalViewState extends State<TerminalView> {
     _lastTerminalWidth = termWidth;
     _lastTerminalHeight = termHeight;
 
-    widget.terminal
-        .resize(termWidth, termHeight, _width!.floor(), _height!.floor());
+    widget.terminal.resize(
+      termWidth,
+      termHeight,
+      (termWidth * _cellSize.cellWidth).floor(),
+      (termHeight * _cellSize.cellHeight).floor(),
+    );
   }
 
   TextEditingValue? onInput(TextEditingValue value) {