Skip to content

Commit

Permalink
fix: config cmdbar width
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-grgt committed Jan 31, 2025
1 parent 362b16f commit 03ab8a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ui/pages/configs_page/cmdbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ func (m *CmdBarModel) View(ktx *kontext.ProgramKtx, renderer *ui.Renderer) strin
var views []string

if m.state == SEARCHING || m.state == SEARCHED {
views = append(views, styles.CmdBar.Render(m.searchInput.View()))
views = append(views, renderer.RenderWithStyle(m.searchInput.View(), styles.CmdBar.Width(ktx.WindowWidth-2)))
} else if m.state == EDITING {
views = append(views, styles.CmdBar.Render(m.editInput.View()))
views = append(views, renderer.RenderWithStyle(m.editInput.View(), styles.CmdBar.Width(ktx.WindowWidth-2)))
} else if m.state == UPDATING || m.state == UPDATE_FAILED || m.state == UPDATE_SUCCEEDED || m.state == LOADING {
views = append(views, m.notifier.View(ktx, renderer))
}
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/configs_page/configs_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (m *Model) View(ktx *kontext.ProgramKtx, renderer *ui.Renderer) string {
{Title: "Config", Width: int(float64(ktx.WindowWidth-5) * 0.5)},
{Title: "Value", Width: int(float64(ktx.WindowWidth-5) * 0.5)},
})
m.table.SetHeight(ktx.AvailableHeight)
m.table.SetHeight(ktx.AvailableHeight - 2)
m.table.SetRows(m.rows)
m.table.Focus()
if m.cmdBar.IsFocused() {
Expand Down

0 comments on commit 03ab8a1

Please sign in to comment.