~whereswaldon/gio-x

b8533313f9763baca2bde1107fb75202ef579792 — Gordon Klaus 1 year, 5 months ago fd712aa
component: [API] remove redundant TextField.Alignment

The embedded widget.Editor already has Alignment (of type text.Alignment instead of layout.Alignment).

TextField.Alignment became ineffective in 64527da when we started laying out the editor in a Flexed child.

Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>
1 files changed, 0 insertions(+), 12 deletions(-)

M component/text_field.go
M component/text_field.go => component/text_field.go +0 -12
@@ 25,8 25,6 @@ type TextField struct {
	// click detects when the mouse pointer clicks or hovers
	// within the textfield.
	click gesture.Click
	// Alignment specifies where to anchor the text.
	Alignment layout.Alignment

	// Helper text to give additional context to a field.
	Helper string


@@ 289,16 287,6 @@ func (in *TextField) Layout(gtx C, th *material.Theme, hint string) D {
							return layout.Flex{
								Axis:      layout.Horizontal,
								Alignment: layout.Middle,
								Spacing: func() layout.Spacing {
									switch in.Alignment {
									case layout.Middle:
										return layout.SpaceSides
									case layout.End:
										return layout.SpaceStart
									default: // layout.Start and all others
										return layout.SpaceEnd
									}
								}(),
							}.Layout(
								gtx,
								layout.Rigid(func(gtx C) D {