From a41f58286646057d1c022e260662944efd7b85ce Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 23 Mar 2014 20:54:11 -0400 Subject: Added Area resizing. Everything mostly works, but not making things smaller... --- sysdata_unix.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sysdata_unix.go') 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 +} -- cgit v1.2.3