diff options
author | Alexander Neumann <alexander.neumann@picos-software.com> | 2019-02-27 17:10:40 +0100 |
---|---|---|
committer | Alexander Neumann <alexander.neumann@picos-software.com> | 2019-02-27 17:10:40 +0100 |
commit | 240beed70949c0bacaa3a6b3494499d46dc2356a (patch) | |
tree | d3aa5542413f916f62a898706f25c5ef3b7f3bea | |
parent | Add support for specifying widget alignment on layout level (diff) | |
download | wireguard-windows-240beed70949c0bacaa3a6b3494499d46dc2356a.tar.xz wireguard-windows-240beed70949c0bacaa3a6b3494499d46dc2356a.zip |
[Line|Text]Edit: Rename [Set]Alignment to [Set]TextAlignment
-rw-r--r-- | declarative/lineedit.go | 4 | ||||
-rw-r--r-- | declarative/textedit.go | 4 | ||||
-rw-r--r-- | lineedit.go | 4 | ||||
-rw-r--r-- | textedit.go | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/declarative/lineedit.go b/declarative/lineedit.go index fcbb69a5..10b3a64b 100644 --- a/declarative/lineedit.go +++ b/declarative/lineedit.go @@ -53,7 +53,6 @@ type LineEdit struct { // LineEdit - Alignment Alignment1D AssignTo **walk.LineEdit CaseMode CaseMode CueBanner string @@ -63,6 +62,7 @@ type LineEdit struct { PasswordMode bool ReadOnly Property Text Property + TextAlignment Alignment1D TextColor walk.Color } @@ -79,7 +79,7 @@ func (le LineEdit) Create(builder *Builder) error { return builder.InitWidget(le, w, func() error { w.SetTextColor(le.TextColor) - if err := w.SetAlignment(walk.Alignment1D(le.Alignment)); err != nil { + if err := w.SetTextAlignment(walk.Alignment1D(le.TextAlignment)); err != nil { return err } diff --git a/declarative/textedit.go b/declarative/textedit.go index a84450b5..26510900 100644 --- a/declarative/textedit.go +++ b/declarative/textedit.go @@ -46,13 +46,13 @@ type TextEdit struct { // TextEdit - Alignment Alignment1D AssignTo **walk.TextEdit HScroll bool MaxLength int OnTextChanged walk.EventHandler ReadOnly Property Text Property + TextAlignment Alignment1D TextColor walk.Color VScroll bool } @@ -78,7 +78,7 @@ func (te TextEdit) Create(builder *Builder) error { return builder.InitWidget(te, w, func() error { w.SetTextColor(te.TextColor) - if err := w.SetAlignment(walk.Alignment1D(te.Alignment)); err != nil { + if err := w.SetTextAlignment(walk.Alignment1D(te.TextAlignment)); err != nil { return err } diff --git a/lineedit.go b/lineedit.go index e8c9cd9e..da4c1251 100644 --- a/lineedit.go +++ b/lineedit.go @@ -144,7 +144,7 @@ func (le *LineEdit) SetTextSelection(start, end int) { le.SendMessage(win.EM_SETSEL, uintptr(start), uintptr(end)) } -func (le *LineEdit) Alignment() Alignment1D { +func (le *LineEdit) TextAlignment() Alignment1D { switch win.GetWindowLong(le.hWnd, win.GWL_STYLE) & (win.ES_LEFT | win.ES_CENTER | win.ES_RIGHT) { case win.ES_CENTER: return AlignCenter @@ -156,7 +156,7 @@ func (le *LineEdit) Alignment() Alignment1D { return AlignNear } -func (le *LineEdit) SetAlignment(alignment Alignment1D) error { +func (le *LineEdit) SetTextAlignment(alignment Alignment1D) error { if alignment == AlignDefault { alignment = AlignNear } diff --git a/textedit.go b/textedit.go index 6897666c..f25fa084 100644 --- a/textedit.go +++ b/textedit.go @@ -92,7 +92,7 @@ func (te *TextEdit) SetText(value string) (err error) { return } -func (te *TextEdit) Alignment() Alignment1D { +func (te *TextEdit) TextAlignment() Alignment1D { switch win.GetWindowLong(te.hWnd, win.GWL_STYLE) & (win.ES_LEFT | win.ES_CENTER | win.ES_RIGHT) { case win.ES_CENTER: return AlignCenter @@ -104,7 +104,7 @@ func (te *TextEdit) Alignment() Alignment1D { return AlignNear } -func (te *TextEdit) SetAlignment(alignment Alignment1D) error { +func (te *TextEdit) SetTextAlignment(alignment Alignment1D) error { if alignment == AlignDefault { alignment = AlignNear } |