diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-25 11:58:13 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-25 11:58:13 -0400 |
| commit | 39f0c352fbeeb4119aedeee1a5974f4d411339c8 (patch) | |
| tree | 4d9362dd1313c5b3dd5cd1e417e8a332b057cf83 /prefsize_unix.go | |
| parent | 55c636b1e3823ec73a9b10d78a03528a54e63bb1 (diff) | |
Added the necessary work to make new regular Labels work on the other platforms.
Diffstat (limited to 'prefsize_unix.go')
| -rw-r--r-- | prefsize_unix.go | 8 |
1 files changed, 5 insertions, 3 deletions
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 } |
