Code cleanup

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3131 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
zoran-vucenovic
2014-06-03 06:55:16 +00:00
parent 56a39e6da2
commit 6ef6225a17

View File

@@ -46,8 +46,7 @@ uses
clocale, // needed to initialize default locale settings on Linux.
{$endif}
Classes, SysUtils, Controls, LCLType, Graphics, Math, StdCtrls, Buttons,
ExtCtrls, Forms, ComCtrls, Types, LMessages, LCLProc, CalendarControlWrapper
;
ExtCtrls, Forms, ComCtrls, Types, LMessages, LCLProc, CalendarControlWrapper;
const
{ We will deal with the NullDate value the special way. It will be especially
@@ -245,8 +244,7 @@ type
procedure MoveSelectionLR(const ToLeft: Boolean);
procedure DestroyCalendarForm;
procedure DropDownCalendarForm;
procedure UpdateShowArrowButton(NewDateMode: TDTDateMode;
NewKind: TDateTimeKind);
procedure UpdateShowArrowButton;
procedure DestroyUpDown;
procedure DestroyArrowBtn;
procedure ArrowMouseDown(Sender: TObject; Button: TMouseButton;
@@ -863,7 +861,7 @@ end;
procedure TCustomZVDateTimePicker.SetDateMode(const AValue: TDTDateMode);
begin
FDateMode := AValue;
UpdateShowArrowButton(AValue, FKind);
UpdateShowArrowButton;
end;
procedure TCustomZVDateTimePicker.SetHideDateTimeParts(AValue: TDateTimeParts);
@@ -1763,7 +1761,7 @@ begin
MoveSelectionLR(False);
FRecalculatingTextSizesNeeded := True;
UpdateShowArrowButton(FDateMode, FKind);
UpdateShowArrowButton;
UpdateDate;
end;
end;
@@ -3470,8 +3468,7 @@ begin
end;
end;
procedure TCustomZVDateTimePicker.UpdateShowArrowButton(
NewDateMode: TDTDateMode; NewKind: TDateTimeKind);
procedure TCustomZVDateTimePicker.UpdateShowArrowButton;
procedure CreateArrowBtn;
begin
@@ -3519,12 +3516,12 @@ var
ReallyShowArrowButton: Boolean;
begin
if NewDateMode = dmNone then begin
if FDateMode = dmNone then begin
DestroyArrowBtn;
DestroyUpDown;
end else begin
ReallyShowArrowButton := (NewDateMode = dmComboBox) and
ReallyShowArrowButton := (FDateMode = dmComboBox) and
not (dtpDay in FEffectiveHideDateTimeParts);
if (ReallyShowArrowButton <> Assigned(FArrowButton)) or