summaryrefslogtreecommitdiff
path: root/sysdata_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'sysdata_unix.go')
-rw-r--r--sysdata_unix.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdata_unix.go b/sysdata_unix.go
index 306d962..6100606 100644
--- a/sysdata_unix.go
+++ b/sysdata_unix.go
@@ -350,3 +350,15 @@ func (s *sysData) len() int {
}
return <-ret
}
+
+func (s *sysData) setAreaSize(width int, height int) {
+ ret := make(chan struct{})
+ defer close(ret)
+ uitask <- func() {
+ c := gtkAreaGetControl(s.widget)
+ gtk_widget_set_size_request(c, width, height)
+ gtk_widget_queue_draw(c) // force repaint (TODO doesn't have an effect when shrinking?)
+ ret <- struct{}{}
+ }
+ <-ret
+}