Removed the generic preferredSize() from the Windows backend; all controls are now expected to provide their own on Windows (this is really the only way to go there). NOW I can rework the whole control nonsense...

This commit is contained in:
Pietro Gagliardi 2014-08-02 12:37:41 -04:00
parent cafc9daa72
commit 1f6bcde3d9
1 changed files with 1 additions and 4 deletions

View File

@ -31,10 +31,7 @@ func newControl(class C.LPWSTR, style C.DWORD, extstyle C.DWORD) *controlbase {
C.ShowWindow(c.hwnd, C.SW_HIDE)
}
c.fallocate = baseallocate(c)
c.fpreferredSize = func(d *sizing) (int, int) {
// TODO
return 75, 23
}
// don't specify c.fpreferredSize; it is custom on ALL controls
c.fcommitResize = func(a *allocation, d *sizing) {
C.moveWindow(c.hwnd, C.int(a.x), C.int(a.y), C.int(a.width), C.int(a.height))
}