From d2b965a2c5f67c1e7b08d5e15aecdb06f434e0ec Mon Sep 17 00:00:00 2001 From: lucor Date: Thu, 9 Nov 2023 20:46:00 +0100 Subject: [PATCH] ci,ui: fix fyne deprecate warnings --- internal/ui/action_edit_item.go | 2 +- internal/ui/item_note.go | 2 +- internal/ui/item_totp.go | 2 +- internal/ui/items.go | 2 +- internal/ui/password_generator.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/ui/action_edit_item.go b/internal/ui/action_edit_item.go index b1649aa..7a029d6 100644 --- a/internal/ui/action_edit_item.go +++ b/internal/ui/action_edit_item.go @@ -105,7 +105,7 @@ func (a *app) makeEditItemView(fyneItem FyneItem) fyne.CanvasObject { }, a.win) d.Show() }) - deleteBtn = container.NewMax(canvas.NewRectangle(color.NRGBA{0xd0, 0x17, 0x2d, 0xff}), button) + deleteBtn = container.NewStack(canvas.NewRectangle(color.NRGBA{0xd0, 0x17, 0x2d, 0xff}), button) } buttonContainer := container.NewBorder(nil, nil, deleteBtn, saveBtn, widget.NewLabel("")) diff --git a/internal/ui/item_note.go b/internal/ui/item_note.go index 3a8b8d1..7df692a 100644 --- a/internal/ui/item_note.go +++ b/internal/ui/item_note.go @@ -74,7 +74,7 @@ func newNoteEntryWithData(bind binding.String) *noteEntry { ne := ¬eEntry{ Entry: widget.Entry{ MultiLine: true, - Wrapping: fyne.TextTruncate, + Wrapping: fyne.TextWrap(fyne.TextTruncateEllipsis), }, } ne.ExtendBaseWidget(ne) diff --git a/internal/ui/item_totp.go b/internal/ui/item_totp.go index 67aa5e1..28bdd03 100644 --- a/internal/ui/item_totp.go +++ b/internal/ui/item_totp.go @@ -68,7 +68,7 @@ func (t *TOTP) Edit(ctx context.Context, w fyne.Window) (fyne.CanvasObject, *paw form.Add(labelWithStyle("Interval")) form.Add(container.NewBorder(nil, nil, nil, intervalEntry, intervalSlider)) - dialog.ShowCustomConfirm("TOTP custom settings", "OK", "Cancel", container.NewMax(form), func(b bool) { + dialog.ShowCustomConfirm("TOTP custom settings", "OK", "Cancel", container.NewStack(form), func(b bool) { if b { totp = copy } diff --git a/internal/ui/items.go b/internal/ui/items.go index a0bc7d8..5704c48 100644 --- a/internal/ui/items.go +++ b/internal/ui/items.go @@ -37,7 +37,7 @@ func newItemsWidget(vault *paw.Vault, opts *paw.VaultFilterOptions) *itemsWidget selectedIndex: -1, } iw.listEntry = iw.makeList(nil, opts) - iw.view = container.NewMax(iw.listEntry) + iw.view = container.NewStack(iw.listEntry) iw.OnSelected = func(i *paw.Metadata) {} iw.ExtendBaseWidget(iw) return iw diff --git a/internal/ui/password_generator.go b/internal/ui/password_generator.go index a4151d6..b328520 100644 --- a/internal/ui/password_generator.go +++ b/internal/ui/password_generator.go @@ -90,7 +90,7 @@ func (pd *pwgenDialog) ShowPasswordGenerator(bind binding.String, password *paw. passwordBind.Set(secret) }) - content := container.NewMax(widget.NewLabel("")) + content := container.NewStack(widget.NewLabel("")) typeOptions := []string{ paw.RandomPassword.String(), paw.PassphrasePassword.String(),