Added ScrollContainer
This commit is contained in:
@@ -278,7 +278,13 @@ func (this scrollbarLayout) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
|
||||
// calculate handle length
|
||||
handleLength := gutterLength * this.viewportContentRatio()
|
||||
if handleLength < handleMin { handleLength = handleMin }
|
||||
if handleLength > gutterLength { handleLength = gutterLength }
|
||||
if handleLength >= gutterLength {
|
||||
// just hide the handle if it isn't needed.
|
||||
// TODO: we need a way to hide and show boxes, this is janky as
|
||||
// fuck
|
||||
boxes[0].SetBounds(image.Rect(-16, -16, 0, 0))
|
||||
return
|
||||
}
|
||||
if this.vertical {
|
||||
handle.Max.Y = int(handleLength)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user