From de164297ab764ac5c8d3bcda6e2e2d98f190256d Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Thu, 14 Jul 2016 11:18:59 +0000 Subject: [PATCH] tvplanit: Less warnings in TVpTaskEditDlg. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4953 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/source/vptaskeditdlg.pas | 4 ++-- components/tvplanit/source/vptasklist.pas | 18 +++++++++--------- .../tvplanit/source/vptasklistpainter.pas | 9 --------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/components/tvplanit/source/vptaskeditdlg.pas b/components/tvplanit/source/vptaskeditdlg.pas index a54105737..dae070b97 100644 --- a/components/tvplanit/source/vptaskeditdlg.pas +++ b/components/tvplanit/source/vptaskeditdlg.pas @@ -146,11 +146,11 @@ begin DetailsMemo.Text := Task.Details; CompleteCB.Checked := Task.Complete; if Task.CompletedOn <> 0 then - CompletedOnLbl.Caption := RSCompletedOn + ' ' + FormatDateTime(ShortDateFormat, Task.CompletedOn) + CompletedOnLbl.Caption := RSCompletedOn + ' ' + FormatDateTime(DefaultFormatSettings.ShortDateFormat, Task.CompletedOn) else CompletedOnLbl.Visible := False; CompletedOnLbl.Visible := CompleteCB.Checked; - CreatedOnLbl.Caption := RSCreatedOn + ' ' + FormatDateTime(ShortDateFormat, Task.CreatedOn); + CreatedOnLbl.Caption := RSCreatedOn + ' ' + FormatDateTime(DefaultFormatSettings.ShortDateFormat, Task.CreatedOn); PositionControls; end; diff --git a/components/tvplanit/source/vptasklist.pas b/components/tvplanit/source/vptasklist.pas index 2e1d4ef19..8b8a20d2b 100644 --- a/components/tvplanit/source/vptasklist.pas +++ b/components/tvplanit/source/vptasklist.pas @@ -178,7 +178,7 @@ type procedure SetMaxVisibleTasks(Value: Word); procedure SetTaskIndex(Value: Integer); procedure SetDrawingStyle(const Value: TVpDrawingStyle); - procedure SetColor(const Value: TColor); + procedure SetColor(const Value: TColor); reintroduce; procedure SetShowIcon (const v : Boolean); procedure SetShowResourceName(Value: Boolean); { internal methods } @@ -285,15 +285,15 @@ uses constructor TVpTaskDisplayOptions.Create(Owner: TVpTaskList); begin inherited Create; - FTaskList := Owner; - FDueDateFormat := ShortDateFormat; - FShowDueDate := true; - FCheckColor := cl3DDkShadow; - FCheckBGColor := clWindow; - FCheckStyle := csCheck; - FOverdueColor := clRed; + FTaskList := Owner; + FDueDateFormat := DefaultFormatSettings.ShortDateFormat; + FShowDueDate := true; + FCheckColor := cl3DDkShadow; + FCheckBGColor := clWindow; + FCheckStyle := csCheck; + FOverdueColor := clRed; FCompletedColor := clGray; - FNormalColor := clBlack; + FNormalColor := clBlack; end; {=====} diff --git a/components/tvplanit/source/vptasklistpainter.pas b/components/tvplanit/source/vptasklistpainter.pas index 47c14aee3..590624de3 100644 --- a/components/tvplanit/source/vptasklistpainter.pas +++ b/components/tvplanit/source/vptasklistpainter.pas @@ -272,18 +272,9 @@ begin Bmp := Graphics.TBitmap.Create; try Bmp.LoadFromResourceName(HINSTANCE, 'VPCHECKPAD'); //soner changed: Bmp.Handle := LoadBaseBitmap('VPCHECKPAD'); - { load and return the handle to bitmap resource} if Bmp.Height > 0 then begin - GlyphRect := Rect( - HeadRect.Left + TextMargin, - HeadRect.Top + TextMargin, - GlyphRect.Left + Bmp.Width, - GlyphRect.Top + Bmp.Height - ); - { GlyphRect.TopLeft := Point(HeadRect.Left + TextMargin, HeadRect.Top + TextMargin); GlyphRect.BottomRight := Point(GlyphRect.Left + Bmp.Width, GlyphRect.Top + Bmp.Height); - } //TODO: RenderCanvas.BrushCopy (TPSRotateRectangle (Angle, RenderIn, GlyphRect), // Bmp, Rect(0, 0, Bmp.Width, Bmp.Height), // Bmp.Canvas.Pixels[0, Bmp.Height - 1]);