diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-01 15:11:09 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-01 15:11:09 -0400 |
| commit | 7f027bae3c34afb1261ef60aa3754676f0fa648a (patch) | |
| tree | fc023bb8cb3267f32193657d3f92a57a5064a80e | |
| parent | 9c0aa7be5c3f3f790b36f0b65512fdea865e8084 (diff) | |
Applied non-standalone Label offsets to the Windows backend. Also more TODOs.
| -rw-r--r-- | redo/basicctrls_windows.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/redo/basicctrls_windows.go b/redo/basicctrls_windows.go index 138c6a8..ef16825 100644 --- a/redo/basicctrls_windows.go +++ b/redo/basicctrls_windows.go @@ -165,17 +165,17 @@ func (l *label) SetText(text string) { 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) { -// TODO -/* - yoff := stdDlgSizes[s.ctype].yoff - if s.standalone { - yoff = stdDlgSizes[s.ctype].yoffalt - } - if yoff != 0 { - yoff = int(C.MulDiv(C.int(yoff), C.int(d.baseY), 8)) + if !l.standalone { + yoff := int(C.MulDiv(C.int(labelYOffset), C.int(d.baseY), 8)) + c.y += yoff + c.height -= yoff } - c.y += yoff -*/ l.supercommitResize(c, d) } |
