From 14c7267b107e2a58a89be69a46f855742acf16ec Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 6 Jun 2014 23:31:50 -0400 Subject: Made the preferred size of an Area its size on GTK+ as well. --- prefsize_unix.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'prefsize_unix.go') 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 } -- cgit v1.2.3