Highlight inactive darken tab on mouse hover

Fix #15791, close #15794
This commit is contained in:
Don Ho 2024-11-13 03:00:14 +01:00
parent f607044da0
commit 796b3a40b7
2 changed files with 7 additions and 1 deletions

View File

@ -1475,7 +1475,13 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT* pDrawItemStruct, bool isDarkMode)
{
brushColour = colorActiveBg;
}
if (_currentHoverTabItem == nTab && brushColour != colorActiveBg) // hover on a "darker" inactive tab
{
HLSColour hls(brushColour);
brushColour = hls.toRGB4DarkModWithTuning(15, 0); // make it lighter slightly
}
hBrush = ::CreateSolidBrush(brushColour);
::FillRect(hDC, &inactiveRect, hBrush);
::DeleteObject(static_cast<HGDIOBJ>(hBrush));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB