diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-02 10:05:53 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-02 10:05:53 -0400 |
| commit | 982004d05052ef6aadd22dd5c4e7dbca85ab324a (patch) | |
| tree | 517a0f5a5397e6fb886b5e4741aff4fa18ba10d8 /label_darwin.go | |
| parent | 09db0bffffded1a68c562b2d6451c2a2b29ac279 (diff) | |
go fmt. Precursor to bug report filing.
Diffstat (limited to 'label_darwin.go')
| -rw-r--r-- | label_darwin.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/label_darwin.go b/label_darwin.go index 0508931..0ad73e7 100644 --- a/label_darwin.go +++ b/label_darwin.go @@ -10,14 +10,14 @@ import ( import "C" type label struct { - _id C.id - standalone bool + _id C.id + standalone bool } func finishNewLabel(text string, standalone bool) *label { l := &label{ - _id: C.newLabel(), - standalone: standalone, + _id: C.newLabel(), + standalone: standalone, } l.SetText(text) return l @@ -64,16 +64,16 @@ func (l *label) preferredSize(d *sizing) (width, height int) { func (l *label) commitResize(c *allocation, d *sizing) { if !l.standalone && c.neighbor != nil { c.neighbor.getAuxResizeInfo(d) - if d.neighborAlign.baseline != 0 { // no adjustment needed if the given control has no baseline + 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.controlPreferredSize(l._id) c.height = int(origsize.height) newrect := C.struct_xrect{ - x: C.intptr_t(c.x), - y: C.intptr_t(c.y), - width: C.intptr_t(c.width), - height: C.intptr_t(c.height), + x: C.intptr_t(c.x), + y: C.intptr_t(c.y), + width: C.intptr_t(c.width), + height: C.intptr_t(c.height), } ourAlign := C.alignmentInfo(l._id, newrect) // we need to find the exact Y positions of the baselines |
