fix bug
This commit is contained in:
parent
14f88e2db9
commit
870ede1e1e
1 changed files with 5 additions and 3 deletions
|
|
@ -1036,11 +1036,13 @@ func (obj *Object) GetDefaultSize(mtexts []*d2target.MText, ruler *textmeasure.R
|
||||||
}
|
}
|
||||||
maxTypeWidth = go2.Max(maxTypeWidth, typeDims.Width)
|
maxTypeWidth = go2.Max(maxTypeWidth, typeDims.Width)
|
||||||
|
|
||||||
|
if l := len(c.Constraint); l > 0 {
|
||||||
// 60 covers UNQ constraint with padding, 40 for further constraints covers UNQ + space
|
// 60 covers UNQ constraint with padding, 40 for further constraints covers UNQ + space
|
||||||
if newWidth := 60 + 40*(len(c.Constraint)-1); newWidth > constraintWidth {
|
if newWidth := 60 + 40*(l-1); newWidth > constraintWidth {
|
||||||
constraintWidth = newWidth
|
constraintWidth = newWidth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// The rows get padded a little due to header font being larger than row font
|
// The rows get padded a little due to header font being larger than row font
|
||||||
dims.Height = go2.Max(12, labelDims.Height*(len(obj.SQLTable.Columns)+1))
|
dims.Height = go2.Max(12, labelDims.Height*(len(obj.SQLTable.Columns)+1))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue