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

Method applyStyleScene

core/render.go:243–249  ·  view source on GitHub ↗

applyStyleScene calls ApplyStyle on all widgets in the Scene, This is needed whenever the window geometry, DPI, etc is updated, which affects styling.

()

Source from the content-addressed store, hash-verified

241// This is needed whenever the window geometry, DPI,
242// etc is updated, which affects styling.
243func (sc *Scene) applyStyleScene() {
244 sc.updating = true // prevent rendering
245 defer func() { sc.updating = false }()
246
247 sc.StyleTree()
248 sc.needsLayout = true
249}
250
251// doRebuild does the full re-render and RenderContext Rebuild flag
252// should be used by Widgets to rebuild things that are otherwise

Callers 5

resizeMethod · 0.95
doUpdateMethod · 0.95
doRebuildMethod · 0.95
prefSizeMethod · 0.95
resizedMethod · 0.80

Calls 1

StyleTreeMethod · 0.80

Tested by

no test coverage detected