summaryrefslogtreecommitdiff
path: root/sysdata_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-03 17:44:03 -0500
committerPietro Gagliardi <[email protected]>2014-03-03 17:44:03 -0500
commit962a84e056fd524ed458391961510a1c32892895 (patch)
tree515e6e1b6ad5662b99291f8132edc2afd9ca6e91 /sysdata_unix.go
parent6c3389283138cb4baf5ccc3d5785c318e376f26f (diff)
Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time.
Diffstat (limited to 'sysdata_unix.go')
-rw-r--r--sysdata_unix.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdata_unix.go b/sysdata_unix.go
index f309729..fbfbf80 100644
--- a/sysdata_unix.go
+++ b/sysdata_unix.go
@@ -45,7 +45,8 @@ var classTypes = [nctypes]*classData{
return func() bool {
if s.container != nil && s.resize != nil { // wait for init
width, height := gtk_window_get_size(s.widget)
- err := s.resize(0, 0, width, height)
+ // top-left is (0,0) so no need for winheight
+ err := s.resize(0, 0, width, height, 0)
if err != nil {
panic("child resize failed: " + err.Error())
}
@@ -189,7 +190,7 @@ func (s *sysData) setText(text string) error {
return nil
}
-func (s *sysData) setRect(x int, y int, width int, height int) error {
+func (s *sysData) setRect(x int, y int, width int, height int, winheight int) error {
gtk_fixed_move(s.container, s.widget, x, y)
gtk_widget_set_size_request(s.widget, width, height)
return nil