diff --git a/lcl/extctrls.pp b/lcl/extctrls.pp index b1bfcab754..973e56e357 100644 --- a/lcl/extctrls.pp +++ b/lcl/extctrls.pp @@ -250,7 +250,8 @@ type { TShape } TShapeType = (stRectangle, stSquare, stRoundRect, stRoundSquare, - stEllipse, stCircle, stSquaredDiamond, stDiamond, stTriangle); + stEllipse, stCircle, stSquaredDiamond, stDiamond, + stTriangle, stTriangleLeft, stTriangleRight, stTriangleDown); TShape = class(TGraphicControl) private diff --git a/lcl/include/shape.inc b/lcl/include/shape.inc index 88ec657bd4..45d7bc4afc 100644 --- a/lcl/include/shape.inc +++ b/lcl/include/shape.inc @@ -97,7 +97,52 @@ begin Polygon(P); end; end; - end; + stTriangleDown: + begin + with Self do + begin + P[0].x := (Width - 1) div 2; + P[0].y := Height - PenInc - 1; + P[1].x := Width - PenInc - 1; + P[1].y := PenInc; + P[2].x := PenInc; + P[2].y := PenInc; + P[3].x := P[0].x; + P[3].y := P[0].y; + Polygon(P); + end; + end; + stTriangleLeft: + begin + with Self do + begin + P[0].x := PenInc; + P[0].y := Height div 2; + P[1].x := Width - PenInc - 1; + P[1].y := PenInc; + P[2].x := Width - PenInc - 1; + P[2].y := Height - PenInc - 1; + P[3].x := P[0].x; + P[3].y := P[0].y; + Polygon(P); + end; + end; + stTriangleRight: + begin + with Self do + begin + P[0].x := Width - PenInc - 1; + P[0].y := Height div 2; + P[1].x := PenInc; + P[1].y := PenInc; + P[2].x := PenInc; + P[2].y := Height - PenInc - 1; + P[3].x := P[0].x; + P[3].y := P[0].y; + Polygon(P); + end; + end; + end; end; // to fire OnPaint event inherited Paint;