mirror of
https://github.com/marcusDenslow/terminalShop.git
synced 2026-10-25 02:52:20 +02:00
fix: correct scroll height estimates and improve order selection visibility
The scroll-to-item calculations used wrong item heights (7/5 instead of 9/7) and ignored the 5-line title header offset, causing the viewport to under-scroll. Selected order cards now light up in accent color for better visibility across terminal themes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -51,7 +51,12 @@ func (m Model) buildOrderCard(order models.Order, boxWidth int, isSelected bool,
|
||||
// Order header line: "Order #123" left, "Jan 02 2026 PAID" right
|
||||
nameStyle := m.theme.TextAccent().Bold(true)
|
||||
|
||||
// When selected, item preview text uses accent color instead of dim
|
||||
// so the whole card "lights up" — much more visible than border color alone
|
||||
dimStyle := m.theme.TextDim()
|
||||
if isSelected {
|
||||
dimStyle = m.theme.TextAccent()
|
||||
}
|
||||
|
||||
statusStyle := m.theme.TextHighlight().Bold(true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user