From da7121fa87d8c7f615f67b27e45ed0fc5ca04314 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Wed, 13 Aug 2025 08:45:50 +0200 Subject: [PATCH] Don't append "Disabled: " to menu tooltip if disabled reason is empty In some cases we set a disabled reason but leave the text empty, so that we don't get an error toast when the item is invoked. In such a case it looks awkward if there is a tooltip showing "Disabled: " with no following text. --- pkg/gui/controllers/helpers/confirmation_helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gui/controllers/helpers/confirmation_helper.go b/pkg/gui/controllers/helpers/confirmation_helper.go index df059bef4..c59275275 100644 --- a/pkg/gui/controllers/helpers/confirmation_helper.go +++ b/pkg/gui/controllers/helpers/confirmation_helper.go @@ -348,7 +348,7 @@ func (self *ConfirmationHelper) IsPopupPanelFocused() bool { func (self *ConfirmationHelper) TooltipForMenuItem(menuItem *types.MenuItem) string { tooltip := menuItem.Tooltip - if menuItem.DisabledReason != nil { + if menuItem.DisabledReason != nil && menuItem.DisabledReason.Text != "" { if tooltip != "" { tooltip += "\n\n" }