From 83e7e149783e2d1e50b0244ddf7325b749c42d1e Mon Sep 17 00:00:00 2001 From: dansmor7 <101892345+dansmor7@users.noreply.github.com> Date: Tue, 5 Jul 2022 14:56:01 -0700 Subject: [PATCH] Update tab hover colors (#13434) The hover tab color used to be generated from the selected tab color, which would end up lighter or darker, and white-gray colors would end up pink. It is now simply the selected tab color with 60% opacity. This is also how brushes are created for accent buttons and color buttons (although with different opacity levels). (cherry picked from commit c6b67aad4bde512d0b3bd6af8227e9b602cd1fab) Service-Card-Id: 83894208 Service-Version: 1.15 --- src/cascadia/TerminalApp/TerminalTab.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/cascadia/TerminalApp/TerminalTab.cpp b/src/cascadia/TerminalApp/TerminalTab.cpp index 64cbd16dc4f..a5508e91739 100644 --- a/src/cascadia/TerminalApp/TerminalTab.cpp +++ b/src/cascadia/TerminalApp/TerminalTab.cpp @@ -1452,18 +1452,16 @@ namespace winrt::TerminalApp::implementation subtleFillColorTertiaryBrush.Color(subtleFillColorTertiary); } - hoverTabBrush.Color(TerminalApp::ColorHelper::GetAccentColor(color)); selectedTabBrush.Color(color); // currently if a tab has a custom color, a deselected state is // signified by using the same color with a bit of transparency - auto deselectedTabColor = color; - deselectedTabColor.A = 64; - deselectedTabBrush.Color(deselectedTabColor); + deselectedTabBrush.Color(color); + deselectedTabBrush.Opacity(0.3); + + hoverTabBrush.Color(color); + hoverTabBrush.Opacity(0.6); - // currently if a tab has a custom color, a deselected state is - // signified by using the same color with a bit of transparency - // // Prior to MUX 2.7, we set TabViewItemHeaderBackground, but now we can // use TabViewItem().Background() for that. HOWEVER, // TabViewItem().Background() only sets the color of the tab background