Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit e9ee03e

Browse files
committed
Added Missing file.
1 parent 6146627 commit e9ee03e

6 files changed

+639
-55
lines changed

IDE PlugIn/Colorizer.Hooks.Windows.pas

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,18 @@ function Detour_WinApi_DrawText(hDC: HDC; lpString: LPCWSTR; nCount: Integer; v
173173
OrgColor, LFontColor: Cardinal;
174174
RestoreColor : Boolean;
175175
begin
176-
OrgColor:=0;
177-
RestoreColor:=False;
176+
OrgColor := 0;
177+
RestoreColor := False;
178178

179-
if (uFormat=2084) and HookVTPaintNormalText and Assigned(TColorizerLocalSettings.Settings) and TColorizerLocalSettings.Settings.Enabled then
179+
if (uFormat = 2084) and HookVTPaintNormalText and TColorizerLocalSettings.Settings.Enabled then
180180
begin
181-
LFontColor :=ColorToRGB(TColorizerLocalSettings.ColorMap.FontColor);
182-
RestoreColor:=True;
183-
OrgColor:=SetTextColor(hDC, LFontColor);
181+
LFontColor := ColorToRGB(TColorizerLocalSettings.ColorMap.FontColor);
182+
RestoreColor := True;
183+
OrgColor := SetTextColor(hDC, LFontColor);
184184
end;
185185

186186
//SetTextColor(hDC, ColorToRGB(clRed));
187-
Result:=Trampoline_DrawText(hDC, lpString, nCount, lpRect, uFormat);
187+
Result := Trampoline_DrawText(hDC, lpString, nCount, lpRect, uFormat);
188188
if RestoreColor then
189189
SetTextColor(hDC, OrgColor);
190190
end;
@@ -193,7 +193,7 @@ function Detour_WinApi_DrawText(hDC: HDC; lpString: LPCWSTR; nCount: Integer; v
193193
{.$IFDEF DELPHIXE6_UP}
194194
function Detour_WinApi_DrawTextEx(DC: HDC; lpchText: LPCWSTR; cchText: Integer; var p4: TRect; dwDTFormat: UINT; DTParams: PDrawTextParams): Integer; stdcall;
195195
begin
196-
if (dwDTFormat AND DT_CALCRECT = 0) and (HookDrawActiveTab or HookDrawInActiveTab) and Assigned(TColorizerLocalSettings.Settings) and TColorizerLocalSettings.Settings.Enabled then
196+
if (dwDTFormat AND DT_CALCRECT = 0) and (HookDrawActiveTab or HookDrawInActiveTab) and TColorizerLocalSettings.Settings.Enabled then
197197
begin
198198
if HookDrawActiveTab then
199199
begin
@@ -211,7 +211,7 @@ function Detour_WinApi_DrawTextEx(DC: HDC; lpchText: LPCWSTR; cchText: Integer;
211211
SetTextColor(DC, ColorToRGB(TryStrToColor(TColorizerLocalSettings.Settings.TabIDEActiveFontColor, TColorizerLocalSettings.ColorMap.FontColor)));
212212
end;
213213
end;
214-
Result:=Trampoline_DrawTextEx(DC, lpchText, cchText, p4, dwDTFormat, DTParams);
214+
Result := Trampoline_DrawTextEx(DC, lpchText, cchText, p4, dwDTFormat, DTParams);
215215
end;
216216
{.$ENDIF}
217217

@@ -222,12 +222,12 @@ function Detour_WinApi_ExtTextOutW(DC: HDC; X, Y: Integer; Options: Longint; Rec
222222
LBgColor, OrgColor : Cardinal;
223223
RestoreColor{, RestoreBg} : Boolean;
224224
begin
225-
OrgColor :=0;
226-
RestoreColor :=False;
225+
OrgColor := 0;
226+
RestoreColor := False;
227227

228228
if Assigned(TColorizerLocalSettings.Settings) and TColorizerLocalSettings.Settings.Enabled then
229229
begin
230-
{$IFDEF DELPHIX_SEATTLE_UP}
230+
{$IFDEF DELPHIX_SEATTLE_UP}
231231
if HookNavSymbolSearchFormDrawItem then
232232
begin
233233
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.FontColor));
@@ -237,7 +237,7 @@ function Detour_WinApi_ExtTextOutW(DC: HDC; X, Y: Integer; Options: Longint; Rec
237237
{$ENDIF}
238238
if DrawNamePair then
239239
begin
240-
LBgColor:=GetBkColor(DC);
240+
LBgColor := GetBkColor(DC);
241241
if (TColor(LBgColor) = clWhite) or (TColor(LBgColor) = TColorizerLocalSettings.ColorMap.WindowColor) then
242242
begin
243243
if TColor(LBgColor) = clWhite then
@@ -249,7 +249,7 @@ function Detour_WinApi_ExtTextOutW(DC: HDC; X, Y: Integer; Options: Longint; Rec
249249
SetBkColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.SelectedColor));
250250
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.SelectedFontColor));
251251
end;
252-
DrawNamePair:=False;
252+
DrawNamePair := False;
253253
end
254254
else
255255
begin
@@ -260,7 +260,7 @@ function Detour_WinApi_ExtTextOutW(DC: HDC; X, Y: Integer; Options: Longint; Rec
260260
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.SelectedFontColor))
261261
else
262262
begin
263-
if TColor(GetTextColor(DC))=$006D6D6D then
263+
if TColor(GetTextColor(DC)) = $006D6D6D then
264264
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.DisabledFontColor))
265265
else
266266
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.FontColor));
@@ -273,7 +273,7 @@ function Detour_WinApi_ExtTextOutW(DC: HDC; X, Y: Integer; Options: Longint; Rec
273273
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.SelectedFontColor))
274274
else
275275
begin
276-
if TColor(GetTextColor(DC))=$006D6D6D then
276+
if TColor(GetTextColor(DC)) = $006D6D6D then
277277
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.DisabledFontColor))
278278
else
279279
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.FontColor));
@@ -286,7 +286,7 @@ function Detour_WinApi_ExtTextOutW(DC: HDC; X, Y: Integer; Options: Longint; Rec
286286
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.SelectedFontColor))
287287
else
288288
begin
289-
if TColor(GetTextColor(DC))=$006D6D6D then
289+
if TColor(GetTextColor(DC)) = $006D6D6D then
290290
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.DisabledFontColor))
291291
else
292292
SetTextColor(DC, ColorToRGB(TColorizerLocalSettings.ColorMap.FontColor));
@@ -434,16 +434,12 @@ function InterceptFillRect(hDC: hDC; const lprc: TRect; hbr: HBRUSH): Integer; s
434434

435435
procedure InstallHooksWinAPI();
436436
begin
437-
Trampoline_DrawText := InterceptCreate(@Windows.DrawTextW, @Detour_WinApi_DrawText);
438-
Trampoline_DrawTextEx := InterceptCreate(@Windows.DrawTextEx, @Detour_WinApi_DrawTextEx);
439-
Trampoline_ExtTextOutW := InterceptCreate(@Windows.ExtTextOutW, @Detour_WinApi_ExtTextOutW); //OK
440-
441-
442-
Trampoline_GetSysColor := InterceptCreate(user32, 'GetSysColor', @Detour_WinApi_GetSysColor);
443-
444-
437+
Trampoline_DrawText := InterceptCreate(@Windows.DrawTextW, @Detour_WinApi_DrawText);
438+
Trampoline_DrawTextEx := InterceptCreate(@Windows.DrawTextEx, @Detour_WinApi_DrawTextEx);
439+
Trampoline_ExtTextOutW := InterceptCreate(@Windows.ExtTextOutW, @Detour_WinApi_ExtTextOutW); //OK
440+
Trampoline_GetSysColor := InterceptCreate(user32, 'GetSysColor', @Detour_WinApi_GetSysColor);
445441
//TrampolineGetSysColorBrush := InterceptCreate(user32, 'GetSysColorBrush', @InterceptGetSysColorBrush);
446-
Trampoline_DrawEdge := InterceptCreate(user32, 'DrawEdge', @Detour_WinApi_DrawEdge);
442+
Trampoline_DrawEdge := InterceptCreate(user32, 'DrawEdge', @Detour_WinApi_DrawEdge);
447443
//Trampoline_DrawFrameControl := InterceptCreate(user32, 'DrawFrameControl', @Detour_WinApi_DrawFrameControl);
448444
//TrampolineFillRect := InterceptCreate(user32, 'FillRect', @InterceptFillRect);
449445
end;
@@ -467,10 +463,9 @@ initialization
467463
VCLStylesLock := TCriticalSection.Create;
468464
VCLStylesBrush := TObjectDictionary<string, TListStyleBrush>.Create([doOwnsValues]);
469465
finalization
470-
VCLStylesBrush.Free;
471-
VCLStylesLock.Free;
472-
VCLStylesLock := nil;
473-
466+
VCLStylesBrush.Free;
467+
VCLStylesLock.Free;
468+
VCLStylesLock := nil;
474469

475470
end.
476471

IDE PlugIn/Colorizer.Hooks.pas

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3168,26 +3168,26 @@ function Detour_TUxThemeStyle_DrawElement(Self : TUxThemeStyle;DC: HDC; Details:
31683168
begin
31693169
if TColorizerLocalSettings.Settings.HeaderCustom then
31703170
begin
3171-
LColor1:= TryStrToColor(TColorizerLocalSettings.Settings.HeaderStartGrad, TColorizerLocalSettings.ColorMap.Color);
3172-
LColor2:= TryStrToColor(TColorizerLocalSettings.Settings.HeaderEndGrad, TColorizerLocalSettings.ColorMap.Color);
3171+
LColor1 := TryStrToColor(TColorizerLocalSettings.Settings.HeaderStartGrad, TColorizerLocalSettings.ColorMap.Color);
3172+
LColor2 := TryStrToColor(TColorizerLocalSettings.Settings.HeaderEndGrad, TColorizerLocalSettings.ColorMap.Color);
31733173
end
31743174
else
31753175
begin
3176-
LColor1:= TColorizerLocalSettings.ColorMap.Color;
3177-
LColor2:= TColorizerLocalSettings.ColorMap.Color;
3176+
LColor1 := TColorizerLocalSettings.ColorMap.Color;
3177+
LColor2 := TColorizerLocalSettings.ColorMap.Color;
31783178
end;
31793179

31803180
GradientFillCanvas(LCanvas, LColor1, LColor2, R, gdVertical);
3181-
LCanvas.Brush.Style:=TBrushStyle.bsClear;
3181+
LCanvas.Brush.Style := TBrushStyle.bsClear;
31823182

31833183
if TColorizerLocalSettings.Settings.HeaderCustom then
3184-
LCanvas.Pen.Color:= TryStrToColor(TColorizerLocalSettings.Settings.HeaderBorderColor, TColorizerLocalSettings.ColorMap.FrameTopLeftOuter)
3184+
LCanvas.Pen.Color := TryStrToColor(TColorizerLocalSettings.Settings.HeaderBorderColor, TColorizerLocalSettings.ColorMap.FrameTopLeftOuter)
31853185
else
31863186
LCanvas.Pen.Color:=TColorizerLocalSettings.ColorMap.FrameTopLeftOuter;
31873187
LCanvas.Rectangle(R);
31883188
end;
31893189
finally
3190-
LCanvas.Handle:=0;
3190+
LCanvas.Handle := 0;
31913191
LCanvas.Free;
31923192
RestoreDC(DC, SaveIndex);
31933193
end;
@@ -3401,21 +3401,21 @@ procedure Detour_TCustomComboBox_DrawItem(Self: TCustomComboBox;Index: Integer
34013401
begin
34023402
//Galileo Ownerdraw
34033403
if (TCustomComboBoxClass(Self).Style in [csOwnerDrawFixed, csOwnerDrawVariable]) and MatchText(Self.Name, ['cbPlatforms', 'cbDevices', 'cbStyleSelector', 'cbDeviceSelector']) and Assigned(TColorizerLocalSettings.Settings) and TColorizerLocalSettings.Settings.Enabled then
3404-
EnableStockHook:=True;
3404+
EnableStockHook := True;
34053405

34063406
Trampoline_TCustomComboBox_DrawItem(Self, Index, Rect, State);
3407-
EnableStockHook:=False;
3407+
EnableStockHook := False;
34083408
end;
34093409

34103410

34113411
procedure Detour_TCustomListBox_DrawItem(Self : TCustomListBox; Index: Integer; Rect: TRect; State: TOwnerDrawState);
34123412
begin
34133413
//CASTALIA
34143414
if (TCustomListBoxClass(Self).Style = lbOwnerDrawVariable) and MatchText(Self.Name, ['ResultsList']) then
3415-
EnableStockHook:=True;
3415+
EnableStockHook := True;
34163416

34173417
Trampoline_TCustomListBox_DrawItem(Self, Index, Rect, State);
3418-
EnableStockHook:=False;
3418+
EnableStockHook := False;
34193419
end;
34203420

34213421
procedure Detour_TBrush_SetColor(Self: TBrush; Value: TColor);

IDE PlugIn/Colorizer.SettingsForm.dfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2749,7 +2749,7 @@ object FormIDEColorizerSettings: TFormIDEColorizerSettings
27492749
Left = 416
27502750
Top = 304
27512751
Bitmap = {
2752-
494C010108000D00100010001000FFFFFFFF2110FFFFFFFFFFFFFFFF424D3600
2752+
494C010108000D002C0010001000FFFFFFFF2110FFFFFFFFFFFFFFFF424D3600
27532753
0000000000003600000028000000400000003000000001002000000000000030
27542754
0000000000000000000000000000000000000000000000000000000000000000
27552755
0000000000000000000000000000000000000000000000000000000000000000

IDE PlugIn/DelphiIDEColorizerDXBerlin.dproj

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,7 @@
222222
<Overwrite>true</Overwrite>
223223
</Platform>
224224
</DeployFile>
225-
<DeployClass Name="DependencyModule">
226-
<Platform Name="Win32">
227-
<Operation>0</Operation>
228-
<Extensions>.dll;.bpl</Extensions>
229-
</Platform>
230-
<Platform Name="OSX32">
231-
<Operation>1</Operation>
232-
<Extensions>.dylib</Extensions>
233-
</Platform>
234-
</DeployClass>
225+
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
235226
<DeployClass Name="ProjectOSXResource">
236227
<Platform Name="OSX32">
237228
<RemoteDir>Contents\Resources</RemoteDir>
@@ -543,7 +534,16 @@
543534
<Operation>1</Operation>
544535
</Platform>
545536
</DeployClass>
546-
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
537+
<DeployClass Name="DependencyModule">
538+
<Platform Name="Win32">
539+
<Operation>0</Operation>
540+
<Extensions>.dll;.bpl</Extensions>
541+
</Platform>
542+
<Platform Name="OSX32">
543+
<Operation>1</Operation>
544+
<Extensions>.dylib</Extensions>
545+
</Platform>
546+
</DeployClass>
547547
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
548548
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
549549
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>

0 commit comments

Comments
 (0)