From 72012114f1337713ed0acff476397d9c2dded49f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 9 Jun 2014 16:56:19 -0400 Subject: Properly integrated the Area preferred size into the Windows backend's preferred size table. --- prefsize_windows.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/prefsize_windows.go b/prefsize_windows.go index 57d07fe..d6a41d9 100644 --- a/prefsize_windows.go +++ b/prefsize_windows.go @@ -28,6 +28,7 @@ type dlgunits struct { height int longest bool // TODO actually use this getsize uintptr + area bool // use area sizes instead } var stdDlgSizes = [nctypes]dlgunits{ @@ -66,7 +67,9 @@ var stdDlgSizes = [nctypes]dlgunits{ width: 237, // the first reference says 107 also works; TODO decide which to use height: 8, }, - // TODO area + c_area: dlgunits{ + area: true, + }, } var ( @@ -80,7 +83,7 @@ var ( // This function runs on uitask; call the functions directly. func (s *sysData) preferredSize() (width int, height int) { // the preferred size of an Area is its size - if s.ctype == c_area { + if stdDlgSizes[s.ctype].area { return s.areawidth, s.areaheight } -- cgit v1.2.3