Skip to content

Commit

Permalink
Merge pull request #570 from navidys/container_exec_dialog_size
Browse files Browse the repository at this point in the history
Container exec terminal size change
  • Loading branch information
navidys authored Mar 2, 2025
2 parents 84cc728 + eed5fd9 commit bce001c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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

0 comments on commit bce001c

Please sign in to comment.