forked from joejulian/gio
layout: add NewContext, make zero value Contexts useful
While here, unexport the Queue and Config fields. The NewContext cosntructor is shorter, and there is no reason to expose the fields to accidental mutation. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -114,7 +114,7 @@ func (e *Editor) processPointer(gtx *layout.Context) {
|
||||
axis = gesture.Vertical
|
||||
smin, smax = sbounds.Min.Y, sbounds.Max.Y
|
||||
}
|
||||
sdist := e.scroller.Scroll(gtx.Config, gtx.Queue, gtx.Now(), axis)
|
||||
sdist := e.scroller.Scroll(gtx, gtx, gtx.Now(), axis)
|
||||
var soff int
|
||||
if e.SingleLine {
|
||||
e.scrollRel(sdist, 0)
|
||||
|
||||
Reference in New Issue
Block a user