Added debug chatter to Button.preferredSize() on Windows.
This commit is contained in:
parent
3d002cf3a6
commit
61cf72e44a
|
@ -70,6 +70,7 @@ func (b *button) buttonpreferredSize(d *sizing) (width, height int) {
|
|||
return int(size.cx), int(size.cy)
|
||||
}
|
||||
// that failed, fall back
|
||||
println("message failed; falling back")
|
||||
// don't worry about the error return from GetSystemMetrics(); there's no way to tell (explicitly documented as such)
|
||||
xmargins := 2 * int(C.GetSystemMetrics(C.SM_CXEDGE))
|
||||
return xmargins + int(b.textlen), fromdlgunitsY(buttonHeight, d)
|
||||
|
|
Loading…
Reference in New Issue