From 2c82e906c371ac1bb3772dc0c17dddc47bf080e1 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Wed, 23 Aug 2023 17:51:58 +0100 Subject: [PATCH] Ellipsis for truncating select button --- widget/select.go | 2 +- widget/select_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/widget/select.go b/widget/select.go index d0a69d6037..d268eb266e 100644 --- a/widget/select.go +++ b/widget/select.go @@ -65,7 +65,7 @@ func (s *Select) CreateRenderer() fyne.WidgetRenderer { txtProv := NewRichTextWithText(s.Selected) txtProv.inset = fyne.NewSize(theme.Padding(), theme.Padding()) txtProv.ExtendBaseWidget(txtProv) - txtProv.Truncation = fyne.TextTruncateClip + txtProv.Truncation = fyne.TextTruncateEllipsis if s.disabled { txtProv.Segments[0].(*TextSegment).Style.ColorName = theme.ColorNameDisabled } diff --git a/widget/select_test.go b/widget/select_test.go index 5c8fca05b4..57e8621a29 100644 --- a/widget/select_test.go +++ b/widget/select_test.go @@ -100,7 +100,7 @@ func TestSelect_ClipValue(t *testing.T) { r2 := cache.Renderer(text) assert.Equal(t, 1, len(r2.Objects())) - assert.Equal(t, "some t", r2.Objects()[0].(*canvas.Text).Text) + assert.Equal(t, "som…", r2.Objects()[0].(*canvas.Text).Text) } func TestSelect_Disable(t *testing.T) {