Files
ClaudeDo/src/ClaudeDo.Ui/Views/InteractiveTerminalView.axaml
T
mika kuns d9a4627a1f fix(interactive): set monospace font + stretch on ConPTY terminal
The control derives Cols/Rows from arranged-size / character-cell-size; without an
explicit monospace font (as the working spike set) the cell metrics are off and the
terminal miscomputes its size, so the child TUI renders into the wrong area. Match
the spike's font/BufferSize and stretch to fill the pane.
2026-07-23 16:47:15 +02:00

27 lines
1.4 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:ClaudeDo.Ui.ViewModels"
xmlns:term="using:Iciclecreek.Terminal"
x:Class="ClaudeDo.Ui.Views.InteractiveTerminalView"
x:DataType="vm:InteractiveTerminalViewModel"
x:Name="Root">
<!--
Process="" suppresses TerminalView.OnLoaded's built-in auto-launch (it otherwise spawns its
own cmd.exe/bash the moment this control loads). PtyTerminalSession sets Process/Args/
StartingDirectory to our real target and calls TerminalControl.LaunchProcess() exactly once,
once the view model's descriptor is known (see AttachControl/Start).
-->
<!--
Font + BufferSize match the working spike. The control derives Cols/Rows from
(arranged size / character cell size), so an explicit monospace font is what keeps that
calculation correct; without it the terminal miscomputes its size and the child TUI renders
into the wrong area. Stretch so the pane's full size reaches the control's Arrange pass.
-->
<term:TerminalControl x:Name="TerminalHost" Process=""
FontFamily="Cascadia Mono,Consolas,monospace"
FontSize="14"
BufferSize="2000"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" />
</UserControl>