.Create(TIStringComparer.Ordinal);
-if StyleServices.Available then
-begin
-// Element specific handlers
+ if StyleServices.Available then
+ begin
+ // Element specific handlers
-{$IFDEF HOOK_InfoBar}
- FuncsDrawThemeBackground.Add(VSCLASS_INFOBAR, @UxTheme_InfoBar);
-{$ENDIF}
-{$IFDEF HOOK_BREADCRUMBAR}
- FuncsDrawThemeBackground.Add(VSCLASS_BREADCRUMBAR, @UxTheme_BreadCrumBar);
-{$ENDIF}
-{$IFDEF HOOK_TRYHARDER}
- FuncsDrawThemeBackground.Add(VSCLASS_TRYHARDER, @UxTheme_TryHarder);
-{$ENDIF}
-{$IFDEF HOOK_Tab}
- FuncsDrawThemeBackground.Add(VSCLASS_TAB, @UxTheme_Tab);
-{$ENDIF}
-{$IFDEF HOOK_ToolTip}
- FuncsDrawThemeBackground.Add(VSCLASS_TOOLTIP, @UxTheme_ToolTip);
-{$ENDIF}
-{$IFDEF HOOK_TrackBar}
- FuncsDrawThemeBackground.Add(VSCLASS_TRACKBAR, @UxTheme_TrackBar);
-{$ENDIF}
-{$IFDEF HOOK_PreviewPane}
- FuncsDrawThemeBackground.Add(VSCLASS_PREVIEWPANE, @UxTheme_PreviewPane);
-{$ENDIF}
-{$IFDEF HOOK_ToolBar}
- FuncsDrawThemeBackground.Add(VSCLASS_TOOLBAR, @UxTheme_ToolBar);
-{$ENDIF}
-{$IFDEF HOOK_AddressBand}
- FuncsDrawThemeBackground.Add(VSCLASS_ADDRESSBAND, @UxTheme_AddressBand);
-{$ENDIF}
-{$IFDEF HOOK_SearchBox}
- FuncsDrawThemeBackground.Add(VSCLASS_SEARCHBOX, @UxTheme_SearchBox);
- FuncsDrawThemeBackground.Add(VSCLASS_CompositedSEARCHBOX, @UxTheme_SearchBox);
- FuncsDrawThemeBackground.Add(VSCLASS_SearchBoxComposited, @UxTheme_SearchBox);
- FuncsDrawThemeBackground.Add(VSCLASS_INACTIVESEARCHBOX, @UxTheme_SearchBox);
-{$ENDIF}
-{$IFDEF HOOK_CommandModule}
- FuncsDrawThemeBackground.Add(VSCLASS_COMMANDMODULE, @UxTheme_CommandModule);
-{$ENDIF}
-{$IFDEF HOOK_Menu}
- FuncsDrawThemeBackground.Add(VSCLASS_MENU, @UxTheme_Menu);
-{$ENDIF}
-{$IFDEF HOOK_Rebar}
- FuncsDrawThemeBackground.Add(VSCLASS_REBAR, @UxTheme_Rebar);
-{$ENDIF}
-{$IFDEF HOOK_Edit}
- FuncsDrawThemeBackground.Add(VSCLASS_EDIT, @UxTheme_Edit);
-{$ENDIF}
-{$IFDEF HOOK_ListBox}
- FuncsDrawThemeBackground.Add(VSCLASS_LISTBOX, @UxTheme_ListBox);
-{$ENDIF}
-{$IFDEF HOOK_Spin}
- FuncsDrawThemeBackground.Add(VSCLASS_SPIN, @UxTheme_Spin);
-{$ENDIF}
-{$IFDEF HOOK_ComboBox}
- FuncsDrawThemeBackground.Add(VSCLASS_COMBOBOX, @UxTheme_ComboBox);
-{$ENDIF}
-{$IFDEF HOOK_ListView}
- FuncsDrawThemeBackground.Add(VSCLASS_LISTVIEWPOPUP, @UxTheme_ListViewPopup);
+ {$IFDEF HOOK_InfoBar}
+ FuncsDrawThemeBackground.Add(VSCLASS_INFOBAR, @UxTheme_InfoBar);
+ {$ENDIF}
+ {$IFDEF HOOK_BREADCRUMBAR}
+ FuncsDrawThemeBackground.Add(VSCLASS_BREADCRUMBAR, @UxTheme_BreadCrumBar);
+ {$ENDIF}
+ {$IFDEF HOOK_TRYHARDER}
+ FuncsDrawThemeBackground.Add(VSCLASS_TRYHARDER, @UxTheme_TryHarder);
+ {$ENDIF}
+ {$IFDEF HOOK_Tab}
+ FuncsDrawThemeBackground.Add(VSCLASS_TAB, @UxTheme_Tab);
+ {$ENDIF}
+ {$IFDEF HOOK_ToolTip}
+ FuncsDrawThemeBackground.Add(VSCLASS_TOOLTIP, @UxTheme_ToolTip);
+ {$ENDIF}
+ {$IFDEF HOOK_TrackBar}
+ FuncsDrawThemeBackground.Add(VSCLASS_TRACKBAR, @UxTheme_TrackBar);
+ {$ENDIF}
+ {$IFDEF HOOK_PreviewPane}
+ FuncsDrawThemeBackground.Add(VSCLASS_PREVIEWPANE, @UxTheme_PreviewPane);
+ {$ENDIF}
+ {$IFDEF HOOK_ToolBar}
+ FuncsDrawThemeBackground.Add(VSCLASS_TOOLBAR, @UxTheme_ToolBar);
+ {$ENDIF}
+ {$IFDEF HOOK_AddressBand}
+ FuncsDrawThemeBackground.Add(VSCLASS_ADDRESSBAND, @UxTheme_AddressBand);
+ {$ENDIF}
+ {$IFDEF HOOK_SearchBox}
+ FuncsDrawThemeBackground.Add(VSCLASS_SEARCHBOX, @UxTheme_SearchBox);
+ FuncsDrawThemeBackground.Add(VSCLASS_CompositedSEARCHBOX, @UxTheme_SearchBox);
+ FuncsDrawThemeBackground.Add(VSCLASS_SearchBoxComposited, @UxTheme_SearchBox);
+ FuncsDrawThemeBackground.Add(VSCLASS_INACTIVESEARCHBOX, @UxTheme_SearchBox);
+ {$ENDIF}
+ {$IFDEF HOOK_CommandModule}
+ FuncsDrawThemeBackground.Add(VSCLASS_COMMANDMODULE, @UxTheme_CommandModule);
+ {$ENDIF}
+ {$IFDEF HOOK_Menu}
+ FuncsDrawThemeBackground.Add(VSCLASS_MENU, @UxTheme_Menu);
+ {$ENDIF}
+ {$IFDEF HOOK_Rebar}
+ FuncsDrawThemeBackground.Add(VSCLASS_REBAR, @UxTheme_Rebar);
+ {$ENDIF}
+ {$IFDEF HOOK_Edit}
+ FuncsDrawThemeBackground.Add(VSCLASS_EDIT, @UxTheme_Edit);
+ {$ENDIF}
+ {$IFDEF HOOK_ListBox}
+ FuncsDrawThemeBackground.Add(VSCLASS_LISTBOX, @UxTheme_ListBox);
+ {$ENDIF}
+ {$IFDEF HOOK_Spin}
+ FuncsDrawThemeBackground.Add(VSCLASS_SPIN, @UxTheme_Spin);
+ {$ENDIF}
+ {$IFDEF HOOK_ComboBox}
+ FuncsDrawThemeBackground.Add(VSCLASS_COMBOBOX, @UxTheme_ComboBox);
+ {$ENDIF}
+ {$IFDEF HOOK_ListView}
+ FuncsDrawThemeBackground.Add(VSCLASS_LISTVIEWPOPUP, @UxTheme_ListViewPopup);
- FuncsDrawThemeBackground.Add(VSCLASS_HEADER, @UxTheme_Header);
- FuncsDrawThemeBackground.Add(VSCLASS_ITEMSVIEW_HEADER, @UxTheme_Header);
+ FuncsDrawThemeBackground.Add(VSCLASS_HEADER, @UxTheme_Header);
+ FuncsDrawThemeBackground.Add(VSCLASS_ITEMSVIEW_HEADER, @UxTheme_Header);
- FuncsDrawThemeBackground.Add(VSCLASS_LISTVIEW, @UxTheme_ListView);
- FuncsDrawThemeBackground.Add(VSCLASS_ITEMSVIEW, @UxTheme_ListView);
- FuncsDrawThemeBackground.Add(VSCLASS_ITEMSVIEW_LISTVIEW, @UxTheme_ListView);
- FuncsDrawThemeBackground.Add(VSCLASS_EXPLORER_LISTVIEW, @UxTheme_ListView);
-{$ENDIF}
-{$IFDEF HOOK_DateTimePicker}
- FuncsDrawThemeBackground.Add(VSCLASS_DATEPICKER, @UxTheme_DatePicker);
- FuncsDrawThemeBackground.Add(VSCLASS_MONTHCAL, @UxTheme_MonthCal);
-{$ENDIF}
-{$IFDEF HOOK_Scrollbar}
- FuncsDrawThemeBackground.Add(VSCLASS_SCROLLBAR, @UxTheme_ScrollBar);
-{$ENDIF}
-{$IFDEF HOOK_Progressbar}
- FuncsDrawThemeBackground.Add(VSCLASS_PROGRESS, @UxTheme_ProgressBar);
- FuncsDrawThemeBackground.Add(VSCLASS_PROGRESS_INDERTERMINATE, @UxTheme_ProgressBar);
-{$ENDIF}
-{$IFDEF HOOK_TaskDialog}
- FuncsDrawThemeBackground.Add(VSCLASS_TASKDIALOG, @UxTheme_TaskDialog);
-{$ENDIF}
-{$IFDEF HOOK_Button}
- FuncsDrawThemeBackground.Add(VSCLASS_BUTTON, @UxTheme_Button);
-{$ENDIF}
-{$IFDEF HOOK_AllButtons}
- FuncsDrawThemeBackground.Add('Button-OK;Button', @UxTheme_Button);
- FuncsDrawThemeBackground.Add('Button-CANCEL;Button', @UxTheme_Button);
-{$ENDIF}
-{$IFDEF HOOK_TreeView}
- FuncsDrawThemeBackground.Add(VSCLASS_TREEVIEW, @UxTheme_TreeView);
-{$ENDIF}
-{$IFDEF HOOK_Navigation}
- if TOSVersion.Check(6, 2) then // Windows 8, 10...
- begin
- FuncsDrawThemeBackground.Add(VSCLASS_NAVIGATION, @UxTheme_Navigation);
- FuncsDrawThemeBackground.Add(VSCLASS_COMMONITEMSDIALOG, @UxTheme_CommonItemsDialog);
- end;
-{$ENDIF}
+ FuncsDrawThemeBackground.Add(VSCLASS_LISTVIEW, @UxTheme_ListView);
+ FuncsDrawThemeBackground.Add(VSCLASS_ITEMSVIEW, @UxTheme_ListView);
+ FuncsDrawThemeBackground.Add(VSCLASS_ITEMSVIEW_LISTVIEW, @UxTheme_ListView);
+ FuncsDrawThemeBackground.Add(VSCLASS_EXPLORER_LISTVIEW, @UxTheme_ListView);
+ {$ENDIF}
+ {$IFDEF HOOK_DateTimePicker}
+ FuncsDrawThemeBackground.Add(VSCLASS_DATEPICKER, @UxTheme_DatePicker);
+ FuncsDrawThemeBackground.Add(VSCLASS_MONTHCAL, @UxTheme_MonthCal);
+ {$ENDIF}
+ {$IFDEF HOOK_Scrollbar}
+ FuncsDrawThemeBackground.Add(VSCLASS_SCROLLBAR, @UxTheme_ScrollBar);
+ {$ENDIF}
+ {$IFDEF HOOK_Progressbar}
+ FuncsDrawThemeBackground.Add(VSCLASS_PROGRESS, @UxTheme_ProgressBar);
+ FuncsDrawThemeBackground.Add(VSCLASS_PROGRESS_INDERTERMINATE, @UxTheme_ProgressBar);
+ {$ENDIF}
+ {$IFDEF HOOK_TaskDialog}
+ FuncsDrawThemeBackground.Add(VSCLASS_TASKDIALOG, @UxTheme_TaskDialog);
+ {$ENDIF}
+ {$IFDEF HOOK_Button}
+ FuncsDrawThemeBackground.Add(VSCLASS_BUTTON, @UxTheme_Button);
+ {$ENDIF}
+ {$IFDEF HOOK_AllButtons}
+ FuncsDrawThemeBackground.Add('Button-OK;Button', @UxTheme_Button);
+ FuncsDrawThemeBackground.Add('Button-CANCEL;Button', @UxTheme_Button);
+ {$ENDIF}
+ {$IFDEF HOOK_TreeView}
+ FuncsDrawThemeBackground.Add(VSCLASS_TREEVIEW, @UxTheme_TreeView);
+ {$ENDIF}
+ {$IFDEF HOOK_Navigation}
+ if TOSVersion.Check(6, 2) then // Windows 8, 10...
+ begin
+ FuncsDrawThemeBackground.Add(VSCLASS_NAVIGATION, @UxTheme_Navigation);
+ FuncsDrawThemeBackground.Add(VSCLASS_COMMONITEMSDIALOG, @UxTheme_CommonItemsDialog);
+ end;
+ {$ENDIF}
- // General hooks
- @Trampoline_UxTheme_OpenThemeData := InterceptCreate(themelib, 'OpenThemeData', @Detour_UxTheme_OpenThemeData);
- {$IF CompilerVersion >= 30}
- if TOSVersion.Check(10) then
- begin
- @Trampoline_UxTheme_OpenThemeDataForDPI := InterceptCreate(themelib, 'OpenThemeDataForDpi', @Detour_UxTheme_OpenThemeDataForDPI);
- if (@Trampoline_UxTheme_OpenThemeDataForDPI = nil) and (TOSVersion.Build < 15063) then // W10 Creators Update?
- @Trampoline_UxTheme_OpenThemeDataForDPI := InterceptCreateOrdinal(themelib, 129, @Detour_UxTheme_OpenThemeDataForDPI);
+ // General hooks
+ @Trampoline_UxTheme_OpenThemeData := InterceptCreate(themelib, 'OpenThemeData', @Detour_UxTheme_OpenThemeData);
+ {$IF CompilerVersion >= 30}
+ if TOSVersion.Check(10) then
+ begin
+ @Trampoline_UxTheme_OpenThemeDataForDPI := InterceptCreate(themelib, 'OpenThemeDataForDpi', @Detour_UxTheme_OpenThemeDataForDPI);
+ if (@Trampoline_UxTheme_OpenThemeDataForDPI = nil) and (TOSVersion.Build < 15063) then // W10 Creators Update?
+ @Trampoline_UxTheme_OpenThemeDataForDPI := InterceptCreateOrdinal(themelib, 129, @Detour_UxTheme_OpenThemeDataForDPI);
+ end;
+ {$IFEND}
+ @Trampoline_UxTheme_OpenThemeDataEx := InterceptCreate(themelib, 'OpenThemeDataEx', @Detour_UxTheme_OpenThemeDataEx);
+ @Trampoline_UxTheme_DrawThemeBackground := InterceptCreate(themelib, 'DrawThemeBackground', @Detour_UxTheme_DrawThemeBackground);
+ @Trampoline_UxTheme_DrawThemeBackgroundEx := InterceptCreate(themelib, 'DrawThemeBackgroundEx', @Detour_UxTheme_DrawThemeBackgroundEx);
+ @Trampoline_UxTheme_DrawThemeEdge := InterceptCreate(themelib, 'DrawThemeEdge', @Detour_UxTheme_DrawThemeEdge);
+
+ @Trampoline_UxTheme_DrawThemeText := InterceptCreate(themelib, 'DrawThemeText', @Detour_UxTheme_DrawThemeText);
+ @Trampoline_UxTheme_DrawThemeTextEx := InterceptCreate(themelib, 'DrawThemeTextEx', @Detour_UxTheme_DrawThemeTextEx);
+ @Trampoline_UxTheme_GetThemeSysColor := InterceptCreate(themelib, 'GetThemeSysColor', @Detour_UxTheme_GetThemeSysColor);
+ @Trampoline_UxTheme_GetThemeSysColorBrush := InterceptCreate(themelib, 'GetThemeSysColorBrush', @Detour_UxTheme_GetThemeSysColorBrush);
+ @Trampoline_UxTheme_GetThemeColor := InterceptCreate(themelib, 'GetThemeColor', @Detour_UxTheme_GetThemeColor);
end;
- {$IFEND}
- @Trampoline_UxTheme_OpenThemeDataEx := InterceptCreate(themelib, 'OpenThemeDataEx', @Detour_UxTheme_OpenThemeDataEx);
- @Trampoline_UxTheme_DrawThemeBackground := InterceptCreate(themelib, 'DrawThemeBackground', @Detour_UxTheme_DrawThemeBackground);
- @Trampoline_UxTheme_DrawThemeBackgroundEx := InterceptCreate(themelib, 'DrawThemeBackgroundEx', @Detour_UxTheme_DrawThemeBackgroundEx);
- @Trampoline_UxTheme_DrawThemeEdge := InterceptCreate(themelib, 'DrawThemeEdge', @Detour_UxTheme_DrawThemeEdge);
-
- @Trampoline_UxTheme_DrawThemeText := InterceptCreate(themelib, 'DrawThemeText', @Detour_UxTheme_DrawThemeText);
- @Trampoline_UxTheme_DrawThemeTextEx := InterceptCreate(themelib, 'DrawThemeTextEx', @Detour_UxTheme_DrawThemeTextEx);
- @Trampoline_UxTheme_GetThemeSysColor := InterceptCreate(themelib, 'GetThemeSysColor', @Detour_UxTheme_GetThemeSysColor);
- @Trampoline_UxTheme_GetThemeSysColorBrush := InterceptCreate(themelib, 'GetThemeSysColorBrush', @Detour_UxTheme_GetThemeSysColorBrush);
- @Trampoline_UxTheme_GetThemeColor := InterceptCreate(themelib, 'GetThemeColor', @Detour_UxTheme_GetThemeColor);
-end;
finalization
-InterceptRemove(@Trampoline_UxTheme_GetThemeSysColor);
-InterceptRemove(@Trampoline_UxTheme_GetThemeSysColorBrush);
-InterceptRemove(@Trampoline_UxTheme_OpenThemeData);
-{$IF CompilerVersion >= 30}
-if TOSVersion.Check(10) then
- InterceptRemove(@Trampoline_UxTheme_OpenThemeDataForDPI);
-{$IFEND}
-InterceptRemove(@Trampoline_UxTheme_OpenThemeDataEx);
-InterceptRemove(@Trampoline_UxTheme_GetThemeColor);
-InterceptRemove(@Trampoline_UxTheme_DrawThemeBackground);
-InterceptRemove(@Trampoline_UxTheme_DrawThemeText);
-InterceptRemove(@Trampoline_UxTheme_DrawThemeTextEx);
-InterceptRemove(@Trampoline_UxTheme_DrawThemeBackgroundEx);
-InterceptRemove(@Trampoline_UxTheme_DrawThemeEdge);
-
-THThemesClasses.Free;
-THThemesHWND.Free;
-FuncsDrawThemeBackground.Free;
-
-VCLStylesLock.Free;
-VCLStylesLock := nil;
+ InterceptRemove(@Trampoline_UxTheme_GetThemeSysColor);
+ InterceptRemove(@Trampoline_UxTheme_GetThemeSysColorBrush);
+ InterceptRemove(@Trampoline_UxTheme_OpenThemeData);
+ {$IF CompilerVersion >= 30}
+ if TOSVersion.Check(10) then
+ InterceptRemove(@Trampoline_UxTheme_OpenThemeDataForDPI);
+ {$IFEND}
+ InterceptRemove(@Trampoline_UxTheme_OpenThemeDataEx);
+ InterceptRemove(@Trampoline_UxTheme_GetThemeColor);
+ InterceptRemove(@Trampoline_UxTheme_DrawThemeBackground);
+ InterceptRemove(@Trampoline_UxTheme_DrawThemeText);
+ InterceptRemove(@Trampoline_UxTheme_DrawThemeTextEx);
+ InterceptRemove(@Trampoline_UxTheme_DrawThemeBackgroundEx);
+ InterceptRemove(@Trampoline_UxTheme_DrawThemeEdge);
+
+ THThemesClasses.Free;
+ THThemesHWND.Free;
+ FuncsDrawThemeBackground.Free;
+
+ VCLStylesLock.Free;
+ VCLStylesLock := nil;
end.
diff --git a/Ext/VCLStyleUtils/Common/Vcl.Styles.WebBrowser.pas b/Ext/VCLStyleUtils/Common/Vcl.Styles.WebBrowser.pas
index f9df32e..882269e 100644
--- a/Ext/VCLStyleUtils/Common/Vcl.Styles.WebBrowser.pas
+++ b/Ext/VCLStyleUtils/Common/Vcl.Styles.WebBrowser.pas
@@ -15,7 +15,7 @@
// The Original Code is Vcl.Styles.WebBrowser.pas.
//
// The Initial Developer of the Original Code is Rodrigo Ruz V.
-// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
+// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2023 Rodrigo Ruz V.
// All Rights Reserved.
//
// **************************************************************************************************
diff --git a/Ext/VCLStyleUtils/DDetours/Source/DDetours.pas b/Ext/VCLStyleUtils/DDetours/Source/DDetours.pas
index 6682b64..79135fd 100644
--- a/Ext/VCLStyleUtils/DDetours/Source/DDetours.pas
+++ b/Ext/VCLStyleUtils/DDetours/Source/DDetours.pas
@@ -17,6 +17,7 @@
{define FIX_MADEXCEPT if you are using crash on buffer overrun/underrun feature from MadExcept }
{.$DEFINE FIX_MADEXCEPT}
+{.$define DEVMODE}
{$IFDEF FPC}
{$MODE DELPHI}
@@ -591,7 +592,7 @@ function fDecodeInst(PInst: PInstruction): Integer;
{$IFDEF CPUX64}
IsNxtInstData := ((PInst^.Disp.Flags and (dfUsed or dfRip) = (dfUsed or dfRip)) and (PInst^.Disp.Value = 0));
{$ELSE !CPUX64}
- IsNxtInstData := (PInst^.Disp.Value = UInt64(PInst^.NextInst));
+ IsNxtInstData := (PInst^.Disp.Value = Int64(PInst^.NextInst));
{$ENDIF CPUX64}
if IsNxtInstData then
begin
@@ -1037,7 +1038,7 @@ function CorrectJ(PInst: PInstruction; NewAddr: PByte): Integer;
GetMem(POpc, MAX_INST_LENGTH_N + 1);
try
// Opcsz := GetInstOpCodes(PInst, POpc);
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(PQ) - 6);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(PQ) - 6);
Relsz := GetInt64Size(Offset);
{$IFDEF CPUX64}
if Relsz = ops16bits then
@@ -1110,7 +1111,7 @@ function CorrectJ(PInst: PInstruction; NewAddr: PByte): Integer;
case Relsz of
ops16bits:
begin
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(PQ) - 5);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(PQ) - 5);
PQ^ := opPrfOpSize;
Inc(PQ);
PWord(PQ)^ := LOOP_To_JccZ[PInst^.OpCode and 3];
@@ -1120,7 +1121,7 @@ function CorrectJ(PInst: PInstruction; NewAddr: PByte): Integer;
end;
ops32bits:
begin
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(PQ) - 6);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(PQ) - 6);
PWord(PQ)^ := LOOP_To_JccZ[PInst^.OpCode and 3];
Inc(PQ, 2);
PInt32(PQ)^ := Int32(Offset);
@@ -1204,7 +1205,7 @@ function CorrectJ(PInst: PInstruction; NewAddr: PByte): Integer;
TEST CX,CX
JZ @Dst
}
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(PQ) - 5);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(PQ) - 5);
PQ^ := opPrfOpSize;
Inc(PQ);
PQ^ := $0F;
@@ -1220,7 +1221,7 @@ function CorrectJ(PInst: PInstruction; NewAddr: PByte): Integer;
TEST ECX,ECX
JZ @Dst
}
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(PQ) - 6);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(PQ) - 6);
PQ^ := $0F;
Inc(PQ);
PQ^ := $84; // JZ !
@@ -1261,7 +1262,7 @@ function CorrectJ(PInst: PInstruction; NewAddr: PByte): Integer;
case Relsz of
ops8bits:
begin
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(PQ) - 2);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(PQ) - 2);
PInt8(PQ)^ := UInt8(NOpc);
Inc(PQ);
PInt8(PQ)^ := Int8(Offset);
@@ -1269,7 +1270,7 @@ function CorrectJ(PInst: PInstruction; NewAddr: PByte): Integer;
end;
ops16bits:
begin
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(PQ) - 5);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(PQ) - 5);
PUInt32(PQ)^ := UInt32(NOpc);
Inc(PQ, 3);
PInt16(PQ)^ := Int16(Offset);
@@ -1277,7 +1278,7 @@ function CorrectJ(PInst: PInstruction; NewAddr: PByte): Integer;
end;
ops32bits:
begin
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(PQ) - 6);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(PQ) - 6);
PUInt16(PQ)^ := UInt16(NOpc);
Inc(PQ, 2);
PInt32(PQ)^ := Int32(Offset);
@@ -1435,7 +1436,7 @@ function CorrectCallRel(PInst: PInstruction; NewAddr: PByte): Integer;
P: PByte;
begin
P := NewAddr;
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(P) - 6);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(P) - 6);
Relsz := GetInt64Size(Offset);
{$IFDEF CPUX64}
{ Only 32-bits relative offset is supported on x64! }
@@ -1449,7 +1450,7 @@ function CorrectCallRel(PInst: PInstruction; NewAddr: PByte): Integer;
case Relsz of
ops16bits:
begin
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(P) - 4);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(P) - 4);
P^ := opPrfOpSize;
Inc(P);
P^ := $E8;
@@ -1459,7 +1460,7 @@ function CorrectCallRel(PInst: PInstruction; NewAddr: PByte): Integer;
end;
ops32bits:
begin
- Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(P) - 5);
+ Offset := Int64(Int64(PInst^.Branch.Target) - Int64(P) - 5);
P^ := $E8;
Inc(P);
PInt32(P)^ := Int32(Offset);
diff --git a/README.htm b/README.htm
new file mode 100644
index 0000000..5d81a4e
--- /dev/null
+++ b/README.htm
@@ -0,0 +1,166 @@
+
+VCLThemeSelector 
+Easy and elegant preview/selection of Theme (Light or Dark) for VCL apps plus HighDPI demo
+Related links: https://www.embarcadero.com/ - https://learndelphi.org/
+With VCLThemeSelector you can easily add a modern and elegant Theme selector for your Delphi VCL app. The Form shows all the VCL Styles included in your application, then arrange them in defined Rows and Columns. You can specify to include or not 'Windows' not-styled option.
+Preview (from Delphi 10.4 to Delphi 12 - using PerControlStyles)
+
+Preview (before Delphi 10.3 - Without PerControlStyle)
+
+Use the VCLThemeSelectorLauncher demo present in Demo Folder to test it, and see how it's easy to use it, like in this example:
+var
+ LStyleName: string;
+ LExcludeWindows: boolean;
+ LMaxRows, LMaxCols: Integer;
+begin
+ LStyleName := TStyleManager.ActiveStyle.Name;
+ LExcludeWindows := False;
+ LMaxRows := 3;
+ LMaxCols := 4;
+ if ShowVCLThemeSelector(LStyleName, LExcludeWindows, LMaxRows, LMaxCols) then
+ TStyleManager.SetStyle(LStyleName);
+end;
+
+License: the CBVCLStylePreview is based on VCLStylePreview (Vcl.Styles.Ext) from:
+github.com/RRUZ/vcl-styles-utils with full High-DPI support, and released under Apache 2.0 license.
+High-DPI Delphi App full example
+Also included in this repository you can find a full example of an HighDPI - VCL Themed enabled application that uses the VCLThemeSelector to change the Theme. You can run the demo from: Demo\Bin\ModernAppDemo.exe.
+Preview ( Delphi 12 and Windows 11 Modern Dark Style)
+
+Preview ( Delphi 12 and Windows 11 Modern Light Style)
+
+Demo from 10.1 to 10.3 (with SVGIconsImageList)
+
+Demo with Delphi 12 (with PerControlStyle and IconFontsImageList)
+
+WARNING: to edit and compile the demo you must first download:
+IconFontsImageList free components here… and SVGIconImageList free components here…
+You can also use StyledComponents, enabling STYLEDCOMPONENTS Compiler directive in the Demo. You must first download StyledComponents here…
+Preview using StyledComponents with Rounded Buttons
+
+License
+this Demo is inspired by TSplitView demo (original software is Copyright (c) 2015 Embarcadero Technologies, Inc.) and is released under Apache 2.0 license.
+
+Compatibility
+VCLThemeSelector and VCLThemeSelectorLauncher are compatible from Delphi XE5 to 12, with some differences to High-DPI support.
+ModernAppDemo is compatible with Delphi Delphi 12, 11, 10.4, 10.3, 10.2 and 10.1 (notice: 10.1 png stream format of pictures inside biolife.xml are incompatible: use an old biolife.xml file).
+Release Notes
+26 Apr 2024
+
+- Added support for Delphi 12.1
+- Added StyledComponents integration
+- Added StyledComponents interposer in demo
+
+20 Oct 2023
+
+- Added support for Delphi 12
+- Examples Built with Delphi 12 (beta)
+
+04 Mar 2023
+
+- Built with Delphi 11.3
+- More VCL Styles supported
+
+15 Sep 2022
+
+- Built with Delphi 11.2
+
+10 Apr 2022
+
+- Built with Delphi 11.1
+- Fixed Size of menu when resize icons
+
+16 Feb 2022
+
+- Added italian translation
+- SetEditorStyleAttributes to assign required/readonly attributes to edit controls
+- Added pixelsperinch when storing font
+- Added RegisterThemeAttributes to interface to add personal Styles
+
+19 Oct 2021
+
+- Replaced “Windows11 Light” and “Windows11 Dark” Styles with “Windows11 Modern Light” and “Windows11 Modern Dark”
+- Updated demos to use new Windows 11 Styles available from Get-It
+
+16 Oct 2021
+
+- Added New Windows11 Light and Dark Themes to Modern Demo (Delphi 11)
+- Added New Windows11 Light and Dark Themes to Launcher (Delphi 11)
+
+23 Aug 2021
+
+- Added support for Delphi 11
+
+24 Jan 2021
+
+- Changed preview to separate Light and Dark Themes
+- Added support for info about Themes:
+TThemeAttribute = class
+StyleName: String;
+ThemeType: TThemeType;
+EditRequiredColor: TColor;
+EditReadonlyColor: TColor;
+end;
+
+30 Aug 2020
+
+- Changed demo to use new IconsFontsVirtualImageList and SVGIconVirtualImageList components
+- Updated external project VCLStyleUtils
+
+19 Jun 2020
+
+- Fixed VCLThemeSelector for app in “Windows” Style for D10.4
+- Recompiled Demo with IconFontsImageList 2.0 (with GDI+ support)
+
+11 Jun 2020
+
+- Added SVGIconImageList
+- Demo: swith icons from Fonts to SVG
+
+09 Jun 2020
+
+- Updated Demo for Delphi 10.4
+- Added custom form “per-control styled” for D10.4
+
+17 May 2020
+
+- Changed “Material Design Desktop” Font used in Demo
+
+27 Apr 2020
+
+- Added VCLThemeSelectorLauncher
+
+25 Apr 2020
+
+- First release of Selector and Demo App
+
diff --git a/README.md b/README.md
index 925207c..9465e66 100644
--- a/README.md
+++ b/README.md
@@ -2,13 +2,11 @@
**Easy and elegant preview/selection of Theme (Light or Dark) for VCL apps plus HighDPI demo**
-
-
Related links: https://www.embarcadero.com/ - https://learndelphi.org/
With **VCLThemeSelector** you can easily add a modern and elegant Theme selector for your Delphi VCL app. The Form shows all the VCL Styles included in your application, then arrange them in defined Rows and Columns. You can specify to include or not 'Windows' not-styled option.
-### Preview (with Delphi 10.4/11 - PerControlStyles)
+### Preview (from Delphi 10.4 to Delphi 12 - using PerControlStyles)

### Preview (before Delphi 10.3 - Without PerControlStyle)
@@ -38,31 +36,49 @@ License: the CBVCLStylePreview is based on VCLStylePreview (Vcl.Styles.Ext) from
Also included in this repository you can find a full example of an HighDPI - VCL Themed enabled application that uses the VCLThemeSelector to change the Theme. You can run the demo from: Demo\Bin\ModernAppDemo.exe.
-### Preview ( Delphi 11.3 and Windows 11 Modern Dark Style)
+### Preview ( Delphi 12 and Windows 11 Modern Dark Style)

-### Preview ( Delphi 11.0 and Windows 11 Modern Light Style)
+### Preview ( Delphi 12 and Windows 11 Modern Light Style)

### Demo from 10.1 to 10.3 (with SVGIconsImageList)

-### Demo with 10.4 (with PerControlStyle and IconFontsImageList)
+### Demo with Delphi 12 (with PerControlStyle and IconFontsImageList)

WARNING: to edit and compile the demo you must first download:
-[IconFontsImageList free components here...](https://github.com/EtheaDev/IconFontsImageList/) and [SVGIconImageList free components here...](https://github.com/EtheaDev/SVGIconImageList/)
+IconFontsImageList free components [here...](https://github.com/EtheaDev/IconFontsImageList/) and SVGIconImageList free components [here...](https://github.com/EtheaDev/SVGIconImageList/)
+
+You can also use StyledComponents, enabling STYLEDCOMPONENTS Compiler directive in the Demo. You must first download StyledComponents [here...](https://github.com/EtheaDev/StyledComponents/)
+
+### Preview using StyledComponents with Rounded Buttons
+
+
+### License
-License: this Demo is inspired by TSplitView demo (original software is Copyright (c) 2015 Embarcadero Technologies, Inc.) and is released under Apache 2.0 license.
+this Demo is inspired by TSplitView demo (original software is Copyright (c) 2015 Embarcadero Technologies, Inc.) and is released under Apache 2.0 license.
+
+
## Compatibility ##
-**VCLThemeSelector** and **VCLThemeSelectorLauncher** are compatible from Delphi XE5 to 11, with some differences to High-DPI support.
+**VCLThemeSelector** and **VCLThemeSelectorLauncher** are compatible from Delphi XE5 to 12, with some differences to High-DPI support.
-**ModernAppDemo** is compatible with Delphi Delphi 11, 10.4, 10.3, 10.2 and 10.1 (notice: 10.1 png stream format of pictures inside biolife.xml are incompatible: use an old biolife.xml file).
+**ModernAppDemo** is compatible with Delphi Delphi 12, 11, 10.4, 10.3, 10.2 and 10.1 (notice: 10.1 png stream format of pictures inside biolife.xml are incompatible: use an old biolife.xml file).
## Release Notes ##
+26 Apr 2024
+- Added support for Delphi 12.1
+- Added StyledComponents integration
+- Added StyledComponents interposer in demo
+
+20 Oct 2023
+- Added support for Delphi 12
+- Examples Built with Delphi 12 (beta)
+
04 Mar 2023
- Built with Delphi 11.3
- More VCL Styles supported
diff --git a/Source/CBVCLStylePreview.pas b/Source/CBVCLStylePreview.pas
index 7b52250..dc413c6 100644
--- a/Source/CBVCLStylePreview.pas
+++ b/Source/CBVCLStylePreview.pas
@@ -4,7 +4,7 @@
{ based on: VCLStylePreview Vcl.Styles.Ext }
{ https://github.com/RRUZ/vcl-styles-utils/ }
{ }
-{ Copyright (c) 2020-2023 (Ethea S.r.l.) }
+{ Copyright (c) 2020-2024 (Ethea S.r.l.) }
{ Author: Carlo Barazzetta }
{ }
{ https://github.com/EtheaDev/VCLThemeSelector }
diff --git a/Source/CBVCLStylePreviewForm.pas b/Source/CBVCLStylePreviewForm.pas
index 413bd08..1dea7e2 100644
--- a/Source/CBVCLStylePreviewForm.pas
+++ b/Source/CBVCLStylePreviewForm.pas
@@ -4,7 +4,7 @@
{ based on: VCLStylePreview Vcl.Styles.Ext }
{ https://github.com/RRUZ/vcl-styles-utils/ }
{ }
-{ Copyright (c) 2020-2023 (Ethea S.r.l.) }
+{ Copyright (c) 2020-2024 (Ethea S.r.l.) }
{ Author: Carlo Barazzetta }
{ }
{ https://github.com/EtheaDev/VCLThemeSelector }
diff --git a/Source/FVCLThemeSelector.dfm b/Source/FVCLThemeSelector.dfm
index 539a73e..1eef085 100644
--- a/Source/FVCLThemeSelector.dfm
+++ b/Source/FVCLThemeSelector.dfm
@@ -21,13 +21,11 @@ object VCLThemeSelectorForm: TVCLThemeSelectorForm
Align = alBottom
BevelOuter = bvNone
TabOrder = 0
- ExplicitTop = 464
- ExplicitWidth = 1065
object StyleLabel: TPanel
AlignWithMargins = True
Left = 3
Top = 3
- Width = 863
+ Width = 859
Height = 32
Align = alClient
Alignment = taRightJustify
@@ -36,7 +34,7 @@ object VCLThemeSelectorForm: TVCLThemeSelectorForm
TabOrder = 1
end
object paRight: TPanel
- Left = 869
+ Left = 865
Top = 0
Width = 196
Height = 38
@@ -71,7 +69,6 @@ object VCLThemeSelectorForm: TVCLThemeSelectorForm
Align = alLeft
TabOrder = 1
OnMouseWheel = ScrollBoxMouseWheel
- ExplicitHeight = 439
object LeftFlowPanel: TFlowPanel
Left = 0
Top = 0
@@ -93,12 +90,10 @@ object VCLThemeSelectorForm: TVCLThemeSelectorForm
Align = alClient
TabOrder = 2
OnMouseWheel = ScrollBoxMouseWheel
- ExplicitWidth = 528
- ExplicitHeight = 439
object RightFlowPanel: TFlowPanel
Left = 0
Top = 0
- Width = 524
+ Width = 520
Height = 400
Align = alTop
AutoSize = True
@@ -115,7 +110,6 @@ object VCLThemeSelectorForm: TVCLThemeSelectorForm
Height = 25
Align = alTop
TabOrder = 3
- ExplicitWidth = 1065
object LightPanel: TPanel
Left = 1
Top = 1
@@ -129,7 +123,7 @@ object VCLThemeSelectorForm: TVCLThemeSelectorForm
object DarkPanel: TPanel
Left = 537
Top = 1
- Width = 527
+ Width = 523
Height = 23
Align = alClient
BevelOuter = bvLowered
diff --git a/Source/FVCLThemeSelector.pas b/Source/FVCLThemeSelector.pas
index 7ff228e..188a1e2 100644
--- a/Source/FVCLThemeSelector.pas
+++ b/Source/FVCLThemeSelector.pas
@@ -2,7 +2,7 @@
{ }
{ VCLThemeSelector: Form for Preview and Selection of VCL Style }
{ }
-{ Copyright (c) 2020-2023 (Ethea S.r.l.) }
+{ Copyright (c) 2020-2024 (Ethea S.r.l.) }
{ Author: Carlo Barazzetta }
{ Contributor: Nicola Tambascia }
{ }
diff --git a/Source/VCLThemeSelector.inc b/Source/VCLThemeSelector.inc
index 51fd592..2803380 100644
--- a/Source/VCLThemeSelector.inc
+++ b/Source/VCLThemeSelector.inc
@@ -33,3 +33,13 @@
{$DEFINE D11_0+}
{$ENDIF}
+// Delphi 12.0
+{$IFDEF VER360}
+ {$DEFINE D10_1+}
+ {$DEFINE D10_2+}
+ {$DEFINE D10_3+}
+ {$DEFINE D10_4+}
+ {$DEFINE D11_0+}
+ {$DEFINE D12_0+}
+{$ENDIF}
+