MCPcopy Create free account
hub / github.com/SolarLune/masterplan / updateMaxLabelSizes

Method updateMaxLabelSizes

contents.go:4362–4388  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4360}
4361
4362func (td *TableData) updateMaxLabelSizes() {
4363
4364 maxSize := float32(0)
4365
4366 for i, heading := range td.RowHeadings {
4367 if i < td.Width {
4368 if maxSize < heading.Label.TextSize().X {
4369 maxSize = heading.Label.TextSize().X
4370 }
4371 }
4372 }
4373
4374 td.MaxLabelWidth = maxSize
4375
4376 maxSize = 0
4377
4378 for i, heading := range td.ColumnHeadings {
4379 if i < td.Height {
4380 if maxSize < heading.Label.TextSize().X {
4381 maxSize = heading.Label.TextSize().X
4382 }
4383 }
4384 }
4385
4386 td.MaxLabelHeight = maxSize
4387
4388}
4389
4390func (td *TableData) Draw() {
4391

Callers 2

UpdateMethod · 0.95
DeserializeMethod · 0.95

Calls 1

TextSizeMethod · 0.80

Tested by

no test coverage detected