Removed borders from Areas on the GTK+ backend.
This commit is contained in:
parent
ff6c3a7cbe
commit
8ee7b2b809
|
@ -50,7 +50,7 @@ func newArea(ab *areabase) Area {
|
|||
areabase: ab,
|
||||
_widget: widget,
|
||||
drawingarea: (*C.GtkDrawingArea)(unsafe.Pointer(widget)),
|
||||
scroller: newScroller(widget, false), // not natively scrollable,
|
||||
scroller: newScroller(widget, false, false), // not natively scrollable, no border
|
||||
clickCounter: new(clickCounter),
|
||||
}
|
||||
for _, c := range areaCallbacks {
|
||||
|
|
|
@ -71,7 +71,7 @@ type scroller struct {
|
|||
scrollwindow *C.GtkScrolledWindow
|
||||
}
|
||||
|
||||
func newScroller(widget *C.GtkWidget, native bool) *scroller {
|
||||
func newScroller(widget *C.GtkWidget, native bool, bordered bool) *scroller {
|
||||
scrollwidget := C.gtk_scrolled_window_new(nil, nil)
|
||||
s := &scroller{
|
||||
scrollwidget: scrollwidget,
|
||||
|
@ -79,8 +79,9 @@ func newScroller(widget *C.GtkWidget, native bool) *scroller {
|
|||
scrollwindow: (*C.GtkScrolledWindow)(unsafe.Pointer(scrollwidget)),
|
||||
}
|
||||
// give the scrolled window a border (thanks to jlindgren in irc.gimp.net/#gtk+)
|
||||
// TODO not on Areas
|
||||
if bordered {
|
||||
C.gtk_scrolled_window_set_shadow_type(s.scrollwindow, C.GTK_SHADOW_IN)
|
||||
}
|
||||
if native {
|
||||
C.gtk_container_add(s.scrollcontainer, widget)
|
||||
} else {
|
||||
|
|
|
@ -31,7 +31,7 @@ type table struct {
|
|||
func finishNewTable(b *tablebase, ty reflect.Type) Table {
|
||||
widget := C.gtk_tree_view_new()
|
||||
t := &table{
|
||||
scroller: newScroller(widget, true),
|
||||
scroller: newScroller(widget, true, true), // natively scrollable; has a border
|
||||
tablebase: b,
|
||||
_widget: widget,
|
||||
treeview: (*C.GtkTreeView)(unsafe.Pointer(widget)),
|
||||
|
|
Loading…
Reference in New Issue