From 39f0c352fbeeb4119aedeee1a5974f4d411339c8 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 25 Jun 2014 11:58:13 -0400 Subject: Added the necessary work to make new regular Labels work on the other platforms. --- prefsize_unix.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'prefsize_unix.go') diff --git a/prefsize_unix.go b/prefsize_unix.go index 7aecdab..68ea589 100644 --- a/prefsize_unix.go +++ b/prefsize_unix.go @@ -12,11 +12,13 @@ package ui // 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) { +// We don't need to worry about y-offset because label alignment is "vertically center", which GtkLabel does for us. + +func (s *sysData) preferredSize() (width int, height int, yoff int) { if s.ctype == c_area { - return s.areawidth, s.areaheight + return s.areawidth, s.areaheight, 0 } _, _, width, height = gtk_widget_get_preferred_size(s.widget) - return width, height + return width, height, 0 } -- cgit v1.2.3