diff options
Diffstat (limited to 'prefsize_unix.go')
| -rw-r--r-- | prefsize_unix.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/prefsize_unix.go b/prefsize_unix.go index dcdd40c..7ec2e86 100644 --- a/prefsize_unix.go +++ b/prefsize_unix.go @@ -14,8 +14,13 @@ import ( // The difference? Minimum size takes into account things like truncation with ellipses: the minimum size of a label can allot just the ellipses! // So we use the natural size instead. // There is a warning about height-for-width controls, but in my tests this isn't an issue. +// For Areas, we manually save the Area size and use that, just to be safe. func (s *sysData) preferredSize() (width int, height int) { + if s.ctype == c_area { + return s.areawidth, s.areaheight + } + _, _, width, height = gtk_widget_get_preferred_size(s.widget) return width, height } |
