Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container exec terminal size change #570

Merged
merged 1 commit into from
Mar 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ui/containers/cntdialogs/vterm/vterm.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (d *VtermDialog) initLayoutUI() {
layout.SetBackgroundColor(bgColor)
layout.SetBorder(false)
layout.AddItem(d.containerInfo, 1, 0, true)
layout.AddItem(utils.EmptyBoxSpace(bgColor), 1, 0, true)
// layout.AddItem(utils.EmptyBoxSpace(bgColor), 1, 0, true)
layout.AddItem(d.termScreen, 0, 1, true)

termLayout.SetBackgroundColor(bgColor)
Expand All @@ -132,7 +132,7 @@ func (d *VtermDialog) initLayoutUI() {
d.layout.SetBorder(true)
d.layout.SetBorderColor(borderColor)
d.layout.SetBackgroundColor(bgColor)
d.layout.SetTitle("CONTAINER TERMINAL")
// d.layout.SetTitle("CONTAINER TERMINAL")

d.layout.AddItem(termLayout, 0, 1, true)
d.layout.AddItem(d.form, dialogs.DialogFormHeight, 0, true)
Expand Down Expand Up @@ -404,7 +404,7 @@ func (d *VtermDialog) SetSessionID(id string) {
id = id[0:utils.IDLength]
}

sessionIDLabel := fmt.Sprintf("SESSION (%s)", id)
sessionIDLabel := fmt.Sprintf("TERMINAL SESSION (%s)", id)
d.termScreen.SetTitle(sessionIDLabel)
}

Expand Down
8 changes: 4 additions & 4 deletions ui/containers/draw.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ func (cnt *Containers) Draw(screen tcell.Screen) { //nolint:cyclop
cnt.Box.DrawForSubclass(screen, cnt)
cnt.Box.SetBorder(false)

x, y, width, height := cnt.GetInnerRect()
cntViewX, cntViewY, cntViewW, cntViewH := cnt.GetInnerRect()

cnt.table.SetRect(x, y, width, height)
cnt.table.SetRect(cntViewX, cntViewY, cntViewW, cntViewH)
cnt.table.SetBorder(true)
cnt.table.Draw(screen)

x, y, width, height = cnt.table.GetInnerRect()
x, y, width, height := cnt.table.GetInnerRect()

// error dialog
if cnt.errorDialog.IsDisplay() {
Expand Down Expand Up @@ -121,7 +121,7 @@ func (cnt *Containers) Draw(screen tcell.Screen) { //nolint:cyclop

// terminal dialog
if cnt.terminalDialog.IsDisplay() {
cnt.terminalDialog.SetRect(x, y, width, height)
cnt.terminalDialog.SetRect(cntViewX, cntViewY, cntViewW, cntViewH)
cnt.terminalDialog.Draw(screen)

return
Expand Down
Loading