Changed PrefSize to PreferredSize throughout.
This commit is contained in:
parent
eec2f985b0
commit
ea3dd093f7
|
@ -21,7 +21,7 @@ func basesetParent(c controlPrivate, p *controlParent) {
|
|||
}
|
||||
|
||||
func basepreferredSize(c controlPrivate, d *sizing) (int, int) {
|
||||
s := C.controlPrefSize(c.id())
|
||||
s := C.controlPreferredSize(c.id())
|
||||
return int(s.width), int(s.height)
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ func (l *label) commitResize(c *allocation, d *sizing) {
|
|||
if d.neighborAlign.baseline != 0 { // no adjustment needed if the given control has no baseline
|
||||
// in order for the baseline value to be correct, the label MUST BE AT THE HEIGHT THAT OS X WANTS IT TO BE!
|
||||
// otherwise, the baseline calculation will be relative to the bottom of the control, and everything will be wrong
|
||||
origsize := C.controlPrefSize(l._id)
|
||||
origsize := C.controlPreferredSize(l._id)
|
||||
c.height = int(origsize.height)
|
||||
newrect := C.struct_xrect{
|
||||
x: C.intptr_t(c.x),
|
||||
|
|
|
@ -83,8 +83,8 @@ struct xalignment {
|
|||
struct xrect rect;
|
||||
intptr_t baseline;
|
||||
};
|
||||
extern struct xsize controlPrefSize(id);
|
||||
extern struct xsize tabPrefSize(id);
|
||||
extern struct xsize controlPreferredSize(id);
|
||||
extern struct xsize tabPreferredSize(id);
|
||||
extern struct xalignment alignmentInfo(id, struct xrect);
|
||||
extern struct xrect frame(id);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ func (t *tab) allocate(x int, y int, width int, height int, d *sizing) []*alloca
|
|||
}
|
||||
|
||||
func (t *tab) preferredSize(d *sizing) (width, height int) {
|
||||
s := C.tabPrefSize(t._id)
|
||||
s := C.tabPreferredSize(t._id)
|
||||
return int(s.width), int(s.height)
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// TODO merge into control_darwin.m or sizing_darwin.m? really need to figure out what to do about the Go-side container struct...
|
||||
|
||||
// also good for NSTableView (TODO might not do what we want) and NSProgressIndicator
|
||||
struct xsize controlPrefSize(id control)
|
||||
struct xsize controlPreferredSize(id control)
|
||||
{
|
||||
NSControl *c;
|
||||
NSRect r;
|
||||
|
@ -25,7 +25,7 @@ struct xsize controlPrefSize(id control)
|
|||
return s;
|
||||
}
|
||||
|
||||
struct xsize tabPrefSize(id control)
|
||||
struct xsize tabPreferredSize(id control)
|
||||
{
|
||||
NSTabView *tv;
|
||||
NSSize s;
|
||||
|
|
Loading…
Reference in New Issue