tvplanit: Define initial control size by GetControlClassDefaultSize. New icons in PrintPreview dialog. Consistent 3D look of TVpPrintPreview.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8469 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-09-10 20:38:31 +00:00
parent 770f452ecf
commit d2fe2df1e7
58 changed files with 247 additions and 454 deletions

View File

@@ -42,7 +42,7 @@ uses
{$ELSE}
Windows, Messages,
{$ENDIF}
Classes, Graphics, Controls, ComCtrls, ExtCtrls, Buttons, Forms, Menus,
Classes, Graphics, Types, Controls, ComCtrls, ExtCtrls, Buttons, Forms, Menus,
VpConst, VpBase, VpBaseDS, VpMisc, VpData, VpSR;
type
@@ -245,6 +245,7 @@ type
{ inherited methods }
procedure CreateParams(var Params: TCreateParams); override;
procedure CreateWnd; override;
class function GetControlClassDefaultSize: TSize; override;
procedure Loaded; override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
@@ -560,16 +561,16 @@ begin
SetLength(mvEventArray, MaxVisibleEvents);
SetLength(mvMonthdayArray, 45);
{ size }
Height := 225;
Width := 300;
{ Popup menu }
FDefaultPopup := TPopupMenu.Create(Self);
FDefaultPopup.Name := 'default';
InitializeDefaultPopup;
Self.PopupMenu := FDefaultPopup;
// Initial size of the control
with GetControlClassDefaultSize do
SetInitialBounds(0, 0, CX, CY);
LoadLanguage;
mvHookUp;
@@ -698,6 +699,13 @@ begin
mvPopulate;
end;
{ Defines the initial size of the control. }
class function TVpMonthView.GetControlClassDefaultSize: TSize;
begin
Result.CX := 225;
Result.CY := 300;
end;
function TVpMonthView.GetControlType: TVpItemType;
begin
Result := itMonthView;