From 796b3a40b7eb16be9e128ab5b997d0c558d0bd81 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 13 Nov 2024 03:00:14 +0100 Subject: [PATCH] Highlight inactive darken tab on mouse hover Fix #15791, close #15794 --- PowerEditor/src/WinControls/TabBar/TabBar.cpp | 8 +++++++- .../dark/tabbar/closeTabButton_hoverOnTab.ico | Bin 1717 -> 1713 bytes 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.cpp b/PowerEditor/src/WinControls/TabBar/TabBar.cpp index f041c464d..37336ea2b 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.cpp +++ b/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(hBrush)); diff --git a/PowerEditor/src/icons/dark/tabbar/closeTabButton_hoverOnTab.ico b/PowerEditor/src/icons/dark/tabbar/closeTabButton_hoverOnTab.ico index 517435b8bc55f966b6d4435fe0260b231376bd6d..58cfcdc4875e4890de82b12bb63a105d145df4a7 100644 GIT binary patch delta 1338 zcmV-A1;zTc4Y3VF000311ON~a000002mmz!002e+000ye000002mogR004Ud000;m z000002mpow0080w001B$000002mna}003x_Lt%fyNklST5WG)PL`st} zDD5r_(6hqZ3xE=_12iy!SD>JZ7{cDjX&@qwQG#f=&ZoQA-M=ZzGHk(NlY5^7nAvKr ztB}`PSIlhxNicZtOQlpZ5lX4XdtU+=LNUdzFq(4!?MUSST4PKRYL7{hd=0SHKBbgr z01r$6wLS z^PGF?;jXlQ;Fq-4-dcM}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