layout: invert baseline to measure positive distance from bottom

With an inverted baseline, the zero value results in the widget
baseline aligned to its bottom.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-10-16 00:36:31 +02:00
parent 8e3d03f2c4
commit e2d0b3cfca
6 changed files with 32 additions and 41 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ func linesDimens(lines []text.Line) layout.Dimensions {
X: w,
Y: h,
},
Baseline: baseline,
Baseline: h - baseline,
}
}