diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-23 20:54:11 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-23 20:54:11 -0400 |
| commit | a41f58286646057d1c022e260662944efd7b85ce (patch) | |
| tree | d675fabc592c366821ad143439fcc5aece4d7a48 /sysdata_unix.go | |
| parent | 0cc13633cb99b59a605296591c81732c11ba06f8 (diff) | |
Added Area resizing. Everything mostly works, but not making things smaller...
Diffstat (limited to 'sysdata_unix.go')
| -rw-r--r-- | sysdata_unix.go | 12 |
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 +} |
