More go fmt.
This commit is contained in:
parent
6e7f15c8e0
commit
37bc89fe52
|
@ -75,7 +75,7 @@ func gListboxNew(multisel bool) *C.GtkWidget {
|
||||||
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())
|
||||||
C.gtk_tree_view_column_set_sizing(column, C.GTK_TREE_VIEW_COLUMN_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_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
|
||||||
|
|
|
@ -34,14 +34,14 @@ func areaPrefSize(control C.id) (width int, height int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var prefsizefuncs = [nctypes]func(C.id) (int, int){
|
var prefsizefuncs = [nctypes]func(C.id) (int, int){
|
||||||
c_button: controlPrefSize,
|
c_button: controlPrefSize,
|
||||||
c_checkbox: controlPrefSize,
|
c_checkbox: controlPrefSize,
|
||||||
c_combobox: controlPrefSize,
|
c_combobox: controlPrefSize,
|
||||||
c_lineedit: controlPrefSize,
|
c_lineedit: controlPrefSize,
|
||||||
c_label: controlPrefSize,
|
c_label: controlPrefSize,
|
||||||
c_listbox: listboxPrefSize,
|
c_listbox: listboxPrefSize,
|
||||||
c_progressbar: pbarPrefSize,
|
c_progressbar: pbarPrefSize,
|
||||||
c_area: areaPrefSize,
|
c_area: areaPrefSize,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *sysData) preferredSize() (width int, height int) {
|
func (s *sysData) preferredSize() (width int, height int) {
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
|
|
||||||
package ui
|
package ui
|
||||||
|
|
||||||
import (
|
|
||||||
// ...
|
|
||||||
)
|
|
||||||
|
|
||||||
// GTK+ 3 makes this easy: controls can tell us what their preferred size is!
|
// GTK+ 3 makes this easy: controls can tell us what their preferred size is!
|
||||||
// ...actually, it tells us two things: the "minimum size" and the "natural size".
|
// ...actually, it tells us two things: the "minimum size" and the "natural size".
|
||||||
// The "minimum size" is the smallest size we /can/ display /anything/. The "natural size" is the smallest size we would /prefer/ to display.
|
// The "minimum size" is the smallest size we /can/ display /anything/. The "natural size" is the smallest size we would /prefer/ to display.
|
||||||
|
|
Loading…
Reference in New Issue