From 1f6bcde3d9ddcab921f2f4347148f6784ca36a14 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 2 Aug 2014 12:37:41 -0400 Subject: [PATCH] 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... --- redo/control_windows.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/redo/control_windows.go b/redo/control_windows.go index 3fdec5d..b2af110 100644 --- a/redo/control_windows.go +++ b/redo/control_windows.go @@ -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)) }