Skip to content

Commit

Permalink
Update tab hover colors (#13434)
Browse files Browse the repository at this point in the history
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 c6b67aa)
Service-Card-Id: 83894208
Service-Version: 1.15
  • Loading branch information
dansmor7 authored and DHowett committed Jul 5, 2022
1 parent 74e3985 commit 83e7e14
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/cascadia/TerminalApp/TerminalTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 83e7e14

Please sign in to comment.