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

Method LayoutDefaults

styles/layout.go:29–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27var ScrollBarWidthDefault = float32(10)
28
29func (s *Style) LayoutDefaults() {
30 s.Justify.Defaults()
31 s.Align.Defaults()
32 s.Gap.Set(units.Em(0.5))
33 s.ScrollBarWidth.Dp(ScrollBarWidthDefault)
34}
35
36// ToDots runs ToDots on unit values, to compile down to raw pixels
37func (s *Style) LayoutToDots(uc *units.Context) {

Callers 1

DefaultsMethod · 0.95

Calls 4

EmFunction · 0.92
DefaultsMethod · 0.65
SetMethod · 0.65
DpMethod · 0.45

Tested by

no test coverage detected