Made Listbox's column autoresizing on GTK+.
This commit is contained in:
parent
e30646ed59
commit
6bd5d10730
|
@ -74,7 +74,8 @@ func gListboxNew(multisel bool) *C.GtkWidget {
|
||||||
widget := C.gtk_tree_view_new_with_model((*C.GtkTreeModel)(unsafe.Pointer(store)))
|
widget := C.gtk_tree_view_new_with_model((*C.GtkTreeModel)(unsafe.Pointer(store)))
|
||||||
tv := (*C.GtkTreeView)(unsafe.Pointer(widget))
|
tv := (*C.GtkTreeView)(unsafe.Pointer(widget))
|
||||||
column := C.gtkTreeViewColumnNewWithAttributes(C.gtk_cell_renderer_text_new())
|
column := C.gtkTreeViewColumnNewWithAttributes(C.gtk_cell_renderer_text_new())
|
||||||
// TODO set AUTOSIZE?
|
C.gtk_tree_view_column_set_sizing(column, C.GTK_TREE_VIEW_COLUMN_AUTOSIZE)
|
||||||
|
C.gtk_tree_view_column_set_resizable(column, C.FALSE) // not resizeable by the user; just autoresize
|
||||||
C.gtk_tree_view_append_column(tv, column)
|
C.gtk_tree_view_append_column(tv, column)
|
||||||
C.gtk_tree_view_set_headers_visible(tv, C.FALSE)
|
C.gtk_tree_view_set_headers_visible(tv, C.FALSE)
|
||||||
sel := C.GTK_SELECTION_SINGLE
|
sel := C.GTK_SELECTION_SINGLE
|
||||||
|
|
Loading…
Reference in New Issue