Restore hover effects for Print button

- RemovePrimaryActionStyle should restore expected HoverColor
- Issue MatterHackers/MCCentral#5093
Inconsistent hover effects
This commit is contained in:
John Lewin 2019-02-24 16:47:21 -08:00
parent 75f33b3499
commit 56b91f2ab1

View file

@ -98,16 +98,16 @@ namespace MatterHackers.MatterControl
{
guiWidget.BackgroundColor = Color.Transparent;
// Buttons in toolbars should revert to ToolbarButtonHover when reset
bool parentIsToolbar = guiWidget.Parent?.Parent is Toolbar;
switch (guiWidget)
{
case PopupMenuButton menuButton:
menuButton.HoverColor = Color.Transparent;
break;
case SimpleFlowButton flowButton:
flowButton.HoverColor = Color.Transparent;
flowButton.HoverColor = (parentIsToolbar) ? this.ToolbarButtonHover : Color.Transparent;
break;
case SimpleButton button:
button.HoverColor = Color.Transparent;
button.HoverColor = (parentIsToolbar) ? this.ToolbarButtonHover : Color.Transparent;
break;
}
}