MCPcopy Create free account
hub / github.com/cogentcore/core / PositionScrolls

Method PositionScrolls

core/scroll.go:144–152  ·  view source on GitHub ↗

PositionScrolls arranges scrollbars

()

Source from the content-addressed store, hash-verified

142
143// PositionScrolls arranges scrollbars
144func (fr *Frame) PositionScrolls() {
145 for d := math32.X; d <= math32.Y; d++ {
146 if fr.HasScroll[d] && fr.scrolls[d] != nil {
147 fr.positionScroll(d)
148 } else {
149 fr.Geom.Scroll.SetDim(d, 0)
150 }
151 }
152}
153
154func (fr *Frame) positionScroll(d math32.Dims) {
155 sb := fr.scrolls[d]

Callers 3

ApplyScenePosMethod · 0.95
RenderWidgetMethod · 0.80
ApplyScenePosMethod · 0.80

Calls 2

positionScrollMethod · 0.95
SetDimMethod · 0.45

Tested by

no test coverage detected