summaryrefslogtreecommitdiff
path: root/prefsize_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'prefsize_unix.go')
-rw-r--r--prefsize_unix.go8
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
}