Fix for visual glitch (#4537)

This commit is contained in:
Niels Laute 2020-06-27 18:39:02 +02:00 committed by GitHub
parent 99eb9429fd
commit 014c26be25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,16 @@ namespace Wox.ViewModel
LoadContextMenu();
}
AreContextButtonsActive = true;
// Result does not contain any context menu items - we don't need to show the context menu ListView at all.
if (ContextMenuItems.Count > 0)
{
AreContextButtonsActive = true;
}
else
{
AreContextButtonsActive = false;
}
if (activationType == ActivationType.Selection)
{
@ -105,7 +114,15 @@ namespace Wox.ViewModel
IsHovered = false;
}
AreContextButtonsActive = IsSelected || IsHovered;
// Result does not contain any context menu items - we don't need to show the context menu ListView at all.
if (ContextMenuItems.Count > 0)
{
AreContextButtonsActive = IsSelected || IsHovered;
}
else
{
AreContextButtonsActive = false;
}
}