From e6ed93f43c9973b4fb83b17fec1e394a1cd169ab Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Wed, 1 Mar 2023 12:36:14 +0000 Subject: [PATCH] CalLite: Hide month/year change arrows and popupmenu when coNoMonthChange is in Options. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8756 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/callite/source/calendarlite.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/callite/source/calendarlite.pas b/components/callite/source/calendarlite.pas index 25efbcfe4..dabeb1627 100644 --- a/components/callite/source/calendarlite.pas +++ b/components/callite/source/calendarlite.pas @@ -790,6 +790,9 @@ var dx, dy, ox, oy, halfx, halfy: integer; pts: TArrowPoints; begin + if (coNoMonthChange in FOwner.Options) then + exit; + FCanvas.Pen.Style := psSolid; if (FCanvas.Brush.Color <> FOwner.Colors.ArrowColor) then FCanvas.Brush.Color:= FOwner.Colors.ArrowColor; @@ -1370,6 +1373,7 @@ begin 2: if not (coNoMonthChange in FOwner.Options) then FOwner.Date := IncMonth(FOwner.Date, -1); 3..5: + if not (coNoMonthChange in FOwner.Options) then begin GetMonthYearRects(Rm{%H-}, Ry{%H-}); if PtInRect(Rm, APoint) then begin @@ -2197,6 +2201,7 @@ begin end; if High(FCalDrawer.FRowPositions) <> FCalDrawer.FLastRow then SetLength(FCalDrawer.FRowPositions, FCalDrawer.FLastRow+1); + if (coNoMonthChange in FOptions) then; Draw; end;