norgepaul / TChromeTabs

Comprehensive Delphi implementation of Chrome's tab system
Other
218 stars 78 forks source link

One-off error when Orientation is set to toBottom #22

Closed haimgel closed 7 years ago

haimgel commented 9 years ago

Hello, When Orientation is set to toBottom, the tabs' bottom border gets cut off. I believe this is an error in ChromeTabsUtils, here's the patch that fixes this issue for me:

--- a/Lib/ChromeTabsUtils.pas
+++ b/Lib/ChromeTabsUtils.pas
@@ -477,7 +477,7 @@ begin
                                 PolygonPoints[i].Y + ControlRect.Top);

       toBottom:     Result[i] := Point(PolygonPoints[i].X + ControlRect.Left,
-                                       (RectHeight(ControlRect) - PolygonPoints[i].Y) + ControlRect.Top);
+                                       (RectHeight(ControlRect) - PolygonPoints[i].Y) + ControlRect.Top - 1);
     end;
   end;
 end;
norgepaul commented 8 years ago

Fixed