MCPcopy
hub / github.com/mathaou/termdbms / GetBaseStyle

Method GetBaseStyle

viewer/tableutil.go:59–73  ·  view source on GitHub ↗

GetBaseStyle returns a new style that is used everywhere

()

Source from the content-addressed store, hash-verified

57
58// GetBaseStyle returns a new style that is used everywhere
59func (m *TuiModel) GetBaseStyle() lipgloss.Style {
60 cw := m.CellWidth()
61 s := lipgloss.NewStyle().
62 Foreground(lipgloss.Color(tuiutil.TextColor())).
63 Width(cw).
64 Align(lipgloss.Left)
65
66 if m.UI.BorderToggle && !tuiutil.Ascii {
67 s = s.BorderLeft(true).
68 BorderStyle(lipgloss.NormalBorder()).
69 BorderForeground(lipgloss.Color(tuiutil.BorderColor()))
70 }
71
72 return s
73}
74
75// GetColumn gets the column the mouse cursor is in
76func (m *TuiModel) GetColumn() int {

Callers 4

initFunction · 0.80
HandleWindowSizeEventsFunction · 0.80
DisplayTableFunction · 0.80
DisplaySelectionFunction · 0.80

Calls 2

CellWidthMethod · 0.95
WidthMethod · 0.80

Tested by

no test coverage detected