summaryrefslogtreecommitdiff
path: root/prefsize_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-04-01 21:24:20 -0400
committerPietro Gagliardi <[email protected]>2014-04-01 21:24:20 -0400
commitcbf439223bb0015d82779d5675fbd058025624c9 (patch)
treed8ec9eab1c6d37c8f94c13818a172082e55d11cf /prefsize_windows.go
parent8cb3991ef9245ebc84d3760bd2bb279b0a3e09ed (diff)
Changed the font loading on Windows to always load the control font unless a flag to not load any font is set; when menus and statusbars are added, they need special casing. This also means the preferred size calculations reads controlFont directly (it will need the same change).
Diffstat (limited to 'prefsize_windows.go')
-rw-r--r--prefsize_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/prefsize_windows.go b/prefsize_windows.go
index 9a16f8d..68b54b9 100644
--- a/prefsize_windows.go
+++ b/prefsize_windows.go
@@ -82,7 +82,7 @@ func (s *sysData) preferredSize() (width int, height int) {
dc = _HANDLE(r1)
r1, _, err = _selectObject.Call(
uintptr(dc),
- uintptr(unsafe.Pointer(*classTypes[s.ctype].font)))
+ uintptr(controlFont))
if r1 == 0 { // failure
panic(fmt.Errorf("error loading control font into device context for preferred size calculation: %v", err))
}