2014-07-17 22:50:14 -05:00
|
|
|
// +build !windows,!darwin
|
2014-07-16 20:30:19 -05:00
|
|
|
|
|
|
|
// 23 february 2014
|
|
|
|
|
|
|
|
package ui
|
|
|
|
|
|
|
|
// #include "gtk_unix.h"
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
type sizing struct {
|
|
|
|
sizingbase
|
|
|
|
|
|
|
|
// for size calculations
|
|
|
|
// gtk+ needs nothing
|
|
|
|
|
|
|
|
// for the actual resizing
|
|
|
|
shouldVAlignTop bool
|
|
|
|
}
|
|
|
|
|
|
|
|
const (
|
|
|
|
gtkXMargin = 12
|
|
|
|
gtkYMargin = 12
|
|
|
|
gtkXPadding = 12
|
|
|
|
gtkYPadding = 6
|
|
|
|
)
|
|
|
|
|
2014-07-28 13:00:01 -05:00
|
|
|
func (c *container) beginResize() (d *sizing) {
|
2014-07-16 20:30:19 -05:00
|
|
|
d = new(sizing)
|
2014-07-28 13:00:01 -05:00
|
|
|
if spaced {
|
2014-07-25 21:13:09 -05:00
|
|
|
d.xmargin = gtkXMargin
|
|
|
|
d.ymargin = gtkYMargin
|
|
|
|
d.xpadding = gtkXPadding
|
|
|
|
d.ypadding = gtkYPadding
|
|
|
|
}
|
2014-07-16 20:30:19 -05:00
|
|
|
return d
|
|
|
|
}
|
|
|
|
|
2014-07-25 18:44:32 -05:00
|
|
|
func (c *container) translateAllocationCoords(allocations []*allocation, winwidth, winheight int) {
|
2014-07-16 20:30:19 -05:00
|
|
|
// no need for coordinate conversion with gtk+
|
|
|
|
}
|