From 56b91f2ab1d4b03d55f9d787b007a1bc82e73cc7 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Sun, 24 Feb 2019 16:47:21 -0800 Subject: [PATCH] Restore hover effects for Print button - RemovePrimaryActionStyle should restore expected HoverColor - Issue MatterHackers/MCCentral#5093 Inconsistent hover effects --- MatterControlLib/ApplicationView/Themes/ThemeConfig.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MatterControlLib/ApplicationView/Themes/ThemeConfig.cs b/MatterControlLib/ApplicationView/Themes/ThemeConfig.cs index b0bb20038..ad4614edf 100644 --- a/MatterControlLib/ApplicationView/Themes/ThemeConfig.cs +++ b/MatterControlLib/ApplicationView/Themes/ThemeConfig.cs @@ -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; } }