Applied non-standalone Label offsets to the Windows backend. Also more TODOs.
This commit is contained in:
parent
9c0aa7be5c
commit
7f027bae3c
|
@ -165,17 +165,17 @@ func (l *label) SetText(text string) {
|
||||||
l.setText(text)
|
l.setText(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
// via http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing
|
||||||
|
labelYOffset = 3
|
||||||
|
// TODO the label is offset slightly by default...
|
||||||
|
)
|
||||||
|
|
||||||
func (l *label) labelcommitResize(c *allocation, d *sizing) {
|
func (l *label) labelcommitResize(c *allocation, d *sizing) {
|
||||||
// TODO
|
if !l.standalone {
|
||||||
/*
|
yoff := int(C.MulDiv(C.int(labelYOffset), C.int(d.baseY), 8))
|
||||||
yoff := stdDlgSizes[s.ctype].yoff
|
c.y += yoff
|
||||||
if s.standalone {
|
c.height -= yoff
|
||||||
yoff = stdDlgSizes[s.ctype].yoffalt
|
|
||||||
}
|
}
|
||||||
if yoff != 0 {
|
|
||||||
yoff = int(C.MulDiv(C.int(yoff), C.int(d.baseY), 8))
|
|
||||||
}
|
|
||||||
c.y += yoff
|
|
||||||
*/
|
|
||||||
l.supercommitResize(c, d)
|
l.supercommitResize(c, d)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue