Highlight inactive darken tab on mouse hover

Fix #15791, close #15794
pull/15799/head
Don Ho 2 weeks ago
parent f607044da0
commit 796b3a40b7

@ -1476,6 +1476,12 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT* pDrawItemStruct, bool isDarkMode)
brushColour = colorActiveBg; 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); hBrush = ::CreateSolidBrush(brushColour);
::FillRect(hDC, &inactiveRect, hBrush); ::FillRect(hDC, &inactiveRect, hBrush);
::DeleteObject(static_cast<HGDIOBJ>(hBrush)); ::DeleteObject(static_cast<HGDIOBJ>(hBrush));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Loading…
Cancel
Save