Browse Source

Highlight inactive darken tab on mouse hover

Fix #15791, close #15794
pull/15799/head
Don Ho 1 week ago
parent
commit
796b3a40b7
  1. 8
      PowerEditor/src/WinControls/TabBar/TabBar.cpp
  2. BIN
      PowerEditor/src/icons/dark/tabbar/closeTabButton_hoverOnTab.ico

8
PowerEditor/src/WinControls/TabBar/TabBar.cpp

@ -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));

BIN
PowerEditor/src/icons/dark/tabbar/closeTabButton_hoverOnTab.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Loading…
Cancel
Save