commit ec97cd5

delthas  ·  2023-07-07 14:01:35 +0000 UTC
parent 30a1dc7
Make the unread ruler smaller
1 files changed,  +11, -2
+11, -2
 1@@ -860,8 +860,17 @@ func (bs *BufferList) DrawTimeline(screen tcell.Screen, x0, y0, nickColWidth int
 2 			if isRead && yi > y0 {
 3 				yi--
 4 				st := tcell.StyleDefault.Foreground(tcell.ColorGray)
 5-				for x := x0; x < x0+bs.tlInnerWidth+nickColWidth+9; x++ {
 6-					screen.SetContent(x, yi, 0x2500, nil, st)
 7+				margin := 5
 8+				for x := x0 + nickColWidth + 9 + margin; x < x0+bs.tlInnerWidth-margin; x++ {
 9+					var r rune
10+					if x == x0+nickColWidth+9+margin {
11+						r = '◄'
12+					} else if x == x0+bs.tlInnerWidth-margin-1 {
13+						r = '►'
14+					} else {
15+						r = 0x2500
16+					}
17+					screen.SetContent(x, yi, r, nil, st)
18 				}
19 				rulerDrawn = true
20 			}