Added debug chatter to Button.preferredSize() on Windows.

This commit is contained in:
Pietro Gagliardi 2014-08-01 21:35:56 -04:00
parent 3d002cf3a6
commit 61cf72e44a
1 changed files with 1 additions and 0 deletions

View File

@ -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)