Fix up objects code

This commit is contained in:
2024-06-11 17:17:11 -04:00
parent 95d3dc3288
commit 1596d54834
4 changed files with 25 additions and 3 deletions

View File

@@ -133,6 +133,7 @@ func (this *ScrollContainer) handleScroll (x, y float64) {
Sub(image.Pt(int(x), int(y))))
}
// TODO: remove this and replace it with something from the layouts package
type scrollContainerLayout struct {
root tomo.ContentObject
horizontal *Scrollbar
@@ -183,6 +184,14 @@ func (this *scrollContainerLayout) Arrange (hints tomo.LayoutHints, boxes []tomo
}
}
func (this *scrollContainerLayout) RecommendedHeight (tomo.LayoutHints, []tomo.Box, int) int {
return 0
}
func (this *scrollContainerLayout) RecommendedWidth (tomo.LayoutHints, []tomo.Box, int) int {
return 0
}
func max (x, y int) int {
if x > y { return x }
return y