From b7a560c01218b06eee8005df077c0818ef8cb183 Mon Sep 17 00:00:00 2001 From: AngryGamer Date: Sat, 18 Mar 2017 18:34:26 -0700 Subject: [PATCH] Fix text on active tabs being clipped (multi-line) --- PowerEditor/src/WinControls/TabBar/TabBar.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.cpp b/PowerEditor/src/WinControls/TabBar/TabBar.cpp index 48a021d9..0c8d45b7 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.cpp +++ b/PowerEditor/src/WinControls/TabBar/TabBar.cpp @@ -857,6 +857,19 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct) rect.bottom += paddingDynamicTwoY; } } + + // the active tab's text with TCS_BUTTONS is lower than normal and gets clipped + if (::GetWindowLongPtr(_hSelf, GWL_STYLE) & TCS_BUTTONS) + { + if (_isVertical) + { + rect.left -= 2; + } + else + { + rect.top -= 2; + } + } // draw highlights on tabs (top bar for active tab / darkened background for inactive tab) RECT barRect = rect;