From cb2c8e102d13f93d641b4ac9e9d4af906ed4630a Mon Sep 17 00:00:00 2001 From: AngryGamer Date: Wed, 29 Mar 2017 04:38:07 -0700 Subject: [PATCH] Remove excess margin with multi-line. --- PowerEditor/src/WinControls/TabBar/TabBar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.cpp b/PowerEditor/src/WinControls/TabBar/TabBar.cpp index 55cf5d2aa..5cd9ae3f7 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.cpp +++ b/PowerEditor/src/WinControls/TabBar/TabBar.cpp @@ -228,11 +228,11 @@ void TabBar::reSizeTo(RECT & rc2Ajust) else // (rowCount >= 2) { style |= TCS_BUTTONS; - marge = 3; // in TCS_BUTTONS mode, each row has few pixels higher + marge = (rowCount - 2) * 3; // in TCS_BUTTONS mode, each row has few pixels higher } ::SetWindowLongPtr(_hSelf, GWL_STYLE, style); - tabsHight = rowCount * (larger - smaller + marge); + tabsHight = rowCount * (larger - smaller) + marge; tabsHight += GetSystemMetrics(_isVertical ? SM_CXEDGE : SM_CYEDGE); if (_isVertical)