summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-09 16:56:19 -0400
committerPietro Gagliardi <[email protected]>2014-06-09 16:56:19 -0400
commit72012114f1337713ed0acff476397d9c2dded49f (patch)
tree17c2a3ee6f5e8ba394f20df1f1a6902aa6604d52
parent14c8cb43e9e03c22775f436085ae6710c856ef07 (diff)
Properly integrated the Area preferred size into the Windows backend's preferred size table.
-rw-r--r--prefsize_windows.go7
1 files 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
}