feat: Increase rendering resolution for Flutter and GLSL renderers to enhance visual clarity

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-20 17:45:54 +01:00
parent 5e19f3c098
commit 1e5222368a
3 changed files with 11 additions and 11 deletions

View File

@@ -198,17 +198,16 @@ class SixelRenderer extends CliRendererBackend<String> {
_outputHeight = math.max(1, (_outputWidth / _targetAspectRatio).floor());
}
// Horizontal: cell-width estimates vary by terminal/font and cause right-shift
// clipping, so keep the image at column 0.
// Vertical: use a conservative row estimate and keep one spare row so the
// terminal does not scroll the image upward when its actual cell height is
// smaller than our approximation.
// Horizontal: cell-width estimates vary by terminal/font and can cause
// right-shift clipping, so keep the image anchored at column 0.
// Vertical: keep one spare row to avoid scroll, but anchor to the bottom
// of the viewport so we avoid obvious empty space under the image.
final int imageRows = math.max(
1,
(_outputHeight / _defaultLineHeightPx).ceil() + _terminalRowSafetyMargin,
);
_offsetColumns = 0;
_offsetRows = math.max(0, (terminalRows - imageRows) ~/ 2);
_offsetRows = math.max(0, terminalRows - imageRows);
if (_offsetColumns != previousOffsetColumns ||
_offsetRows != previousOffsetRows ||