1+ { $I PythonTools.inc}
12unit PythonTools.Design;
23
34interface
@@ -7,10 +8,13 @@ interface
78 Vcl.Controls, Vcl.Forms, Vcl.Dialogs, ToolsAPI;
89
910type
10- TDesignForm = class (TForm, INTAIDEThemingServicesNotifier)
11+ TDesignForm = class (TForm { $IFDEF DELPHI10_2_UP } , INTAIDEThemingServicesNotifier{ $ENDIF DELPHI10_2_UP } )
1112 private
13+ { $IFDEF DELPHI10_2_UP}
1214 FIDEThemingNotifierId: integer;
15+ { $ENDIF DELPHI10_2_UP}
1316 private
17+ { $IFDEF DELPHI10_2_UP}
1418 // IOTANotifier
1519 procedure AfterSave ;
1620 procedure BeforeSave ;
@@ -19,6 +23,7 @@ TDesignForm = class(TForm, INTAIDEThemingServicesNotifier)
1923 // INTAIDEThemingServicesNotifier
2024 procedure ChangingTheme ();
2125 procedure ChangedTheme ();
26+ { $ENDIF DELPHI10_2_UP}
2227 protected
2328 procedure RegisterIDEThemingNotifier ();
2429 procedure UnRegisterIDEThemingNotifier ();
@@ -40,11 +45,17 @@ implementation
4045constructor TDesignForm.Create(AOwner: TComponent);
4146begin
4247 inherited ;
48+ { $IFDEF DELPHI10_2_UP}
49+ { $IFDEF DELPHI10_4_UP}
4350 with (BorlandIDEServices as IOTAIDEThemingServices) do begin
51+ { $ELSE}
52+ with (BorlandIDEServices as IOTAIDEThemingServices250) do begin
53+ { $ENDIF DELPHI10_4_UP}
4454 RegisterFormClass(TCustomFormClass(Self.ClassType));
4555 ApplyIDETheming();
4656 RegisterIDEThemingNotifier();
4757 end ;
58+ { $ENDIF DELPHI10_2_UP}
4859end ;
4960
5061destructor TDesignForm.Destroy;
@@ -53,6 +64,8 @@ destructor TDesignForm.Destroy;
5364 inherited ;
5465end ;
5566
67+ { $IFDEF DELPHI10_2_UP}
68+
5669procedure TDesignForm.AfterSave ;
5770begin
5871end ;
@@ -78,25 +91,33 @@ procedure TDesignForm.ChangedTheme;
7891 ApplyIDETheming();
7992end ;
8093
94+ { $ENDIF DELPHI10_2_UP}
95+
8196procedure TDesignForm.ApplyIDETheming ;
8297begin
98+ { $IFDEF DELPHI10_2_UP}
8399 with (BorlandIDEServices as IOTAIDEThemingServices) do begin
84100 ApplyTheme(Self);
85101 end ;
102+ { $ENDIF DELPHI10_2_UP}
86103end ;
87104
88105procedure TDesignForm.RegisterIDEThemingNotifier ;
89106begin
107+ { $IFDEF DELPHI10_2_UP}
90108 with (BorlandIDEServices as IOTAIDEThemingServices) do begin
91109 FIDEThemingNotifierId := AddNotifier(Self);
92110 end ;
111+ { $ENDIF DELPHI10_2_UP}
93112end ;
94113
95114procedure TDesignForm.UnRegisterIDEThemingNotifier ;
96115begin
116+ { $IFDEF DELPHI10_2_UP}
97117 with (BorlandIDEServices as IOTAIDEThemingServices) do begin
98118 RemoveNotifier(FIDEThemingNotifierId);
99119 end ;
120+ { $ENDIF DELPHI10_2_UP}
100121end ;
101122
102123end .
0 commit comments