SetTabWidth now takes in an Int26_6, and doesn't use emspaces

This commit is contained in:
Sasha Koshka 2024-09-06 00:33:51 -04:00
parent 2aa1d355ec
commit ba1438b700

View File

@ -18,7 +18,7 @@ type TypeSetter struct {
face font.Face
width, height int
wrap bool
tabWidth int
tabWidth fixed.Int26_6
minWidth fixed.Int26_6
layoutBounds image.Rectangle
@ -216,8 +216,8 @@ func (setter *TypeSetter) SetHeight (heignt int) {
setter.height = heignt
}
// SetTabWidth sets the distance between tab stops in em spaces.
func (setter *TypeSetter) SetTabWidth (tabWidth int) {
// SetTabWidth sets the distance between tab stops.
func (setter *TypeSetter) SetTabWidth (tabWidth fixed.Int26_6) {
if setter.tabWidth == tabWidth { return }
setter.layoutClean = false
setter.alignClean = false