Enha: colors
This commit is contained in:
@@ -31,7 +31,8 @@ func makePropsTable(props map[string]float32) *tview.Table {
|
||||
// Create a new table
|
||||
table := tview.NewTable().
|
||||
SetBorders(true).
|
||||
SetSelectable(true, false) // Allow row selection but not column selection
|
||||
SetSelectable(true, false).
|
||||
SetSelectedStyle(tcell.StyleDefault.Background(tcell.ColorDarkCyan).Foreground(tcell.ColorWhite)) // Allow row selection but not column selection
|
||||
|
||||
table.SetTitle("Properties Configuration (Press 'x' to exit)").
|
||||
SetTitleAlign(tview.AlignLeft)
|
||||
@@ -67,7 +68,7 @@ func makePropsTable(props map[string]float32) *tview.Table {
|
||||
}
|
||||
|
||||
valueCell := tview.NewTableCell(valueText).
|
||||
SetTextColor(tcell.ColorGreen).
|
||||
SetTextColor(tcell.ColorYellow).
|
||||
SetAlign(tview.AlignCenter)
|
||||
table.SetCell(row, 1, valueCell)
|
||||
|
||||
@@ -80,8 +81,6 @@ func makePropsTable(props map[string]float32) *tview.Table {
|
||||
row++
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Helper function to add a dropdown-like row, that opens a list popup
|
||||
addListPopupRow := func(label string, options []string, initialValue string, onChange func(string)) {
|
||||
table.SetCell(row, 0,
|
||||
@@ -91,7 +90,7 @@ func makePropsTable(props map[string]float32) *tview.Table {
|
||||
SetSelectable(false))
|
||||
|
||||
valueCell := tview.NewTableCell(initialValue).
|
||||
SetTextColor(tcell.ColorGreen).
|
||||
SetTextColor(tcell.ColorYellow).
|
||||
SetAlign(tview.AlignCenter)
|
||||
table.SetCell(row, 1, valueCell)
|
||||
|
||||
@@ -114,7 +113,7 @@ func makePropsTable(props map[string]float32) *tview.Table {
|
||||
SetSelectable(false))
|
||||
|
||||
valueCell := tview.NewTableCell(initialValue).
|
||||
SetTextColor(tcell.ColorGreen).
|
||||
SetTextColor(tcell.ColorYellow).
|
||||
SetAlign(tview.AlignCenter)
|
||||
table.SetCell(row, 1, valueCell)
|
||||
|
||||
@@ -339,3 +338,4 @@ func makePropsTable(props map[string]float32) *tview.Table {
|
||||
|
||||
return table
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user