diff options
| -rw-r--r-- | redo/control_unix.go | 3 | ||||
| -rw-r--r-- | redo/table_unix.go | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/redo/control_unix.go b/redo/control_unix.go index a5746e7..92baa1b 100644 --- a/redo/control_unix.go +++ b/redo/control_unix.go @@ -81,8 +81,7 @@ func newControl(widget *C.GtkWidget) *controlbase { C.gtk_widget_size_allocate(c.widget, &r) } c.fgetAuxResizeInfo = func(d *sizing) { -//TODO -// d.shouldVAlignTop = (s.ctype == c_listbox) || (s.ctype == c_area) + // controls set this to true if a Label to its left should be vertically aligned to the control's top d.shouldVAlignTop = false } return c diff --git a/redo/table_unix.go b/redo/table_unix.go index 23366f4..2fd2418 100644 --- a/redo/table_unix.go +++ b/redo/table_unix.go @@ -31,8 +31,13 @@ func finishNewTable(b *tablebase, ty reflect.Type) Table { widget := C.gtk_tree_view_new() t := &table{ scrolledcontrol: newScrolledControl(widget, true), - tablebase: b, - treeview: (*C.GtkTreeView)(unsafe.Pointer(widget)), + tablebase: b, + treeview: (*C.GtkTreeView)(unsafe.Pointer(widget)), + } + t.fgetAuxResizeInfo = func(d *sizing) { + // a Label to the left of a Table should be vertically aligned to the top + // TODO do the same with Area + d.shouldVAlignTop = true } model := C.newTableModel(unsafe.Pointer(t)) t.model = model |
