Update Tomo API
This commit is contained in:
@@ -306,9 +306,10 @@ func (this scrollbarLayout) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
|
||||
handleLength := gutterLength * this.viewportContentRatio()
|
||||
if handleLength < handleMin { handleLength = handleMin }
|
||||
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
|
||||
// just hide the handle if it isn't needed. we are the layout
|
||||
// and we shouldn't be adding and removing boxes, so this is
|
||||
// really the only good way to hide things.
|
||||
// TODO perhaps have a "Hidden" rectangle in the Tomo API?
|
||||
boxes[0].SetBounds(image.Rect(-16, -16, 0, 0))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user