Skip to content

Commit afc0ffe

Browse files
committed
debugui: replace a hard coded value with a style member
1 parent 60993d6 commit afc0ffe

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

layout.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (l *layout) widthInPixels(style *style) int {
2424
}
2525

2626
func (l *layout) heightInPixels(style *style) int {
27-
return l.sizeInPixels(l.heights, l.itemIndex/len(l.widths), 18, l.body.Dy(), style)
27+
return l.sizeInPixels(l.heights, l.itemIndex/len(l.widths), style.defaultHeight, l.body.Dy(), style)
2828
}
2929

3030
func (l *layout) sizeInPixels(sizes []int, index int, defaultSize int, entireSize int, style *style) int {

style.go

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99

1010
type style struct {
1111
defaultWidth int
12+
defaultHeight int
1213
padding int
1314
spacing int
1415
indent int
@@ -39,6 +40,7 @@ const (
3940

4041
var defaultStyle style = style{
4142
defaultWidth: 60,
43+
defaultHeight: 18,
4244
padding: 5,
4345
spacing: 4,
4446
indent: lineHeight(),

0 commit comments

Comments
 (0)