From 8f75e68e9ec670ccb39cf4de0b71224a563e52f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Depin=C3=A9=20Dalpiaz?= Date: Tue, 26 Mar 2024 23:17:04 -0300 Subject: [PATCH] version 6.4 - old delphis packages attribute --- CompInstall.ini | 2 +- README.md | 12 ++++++++---- Source/Design/DzHTMLTextDesign_FMX.dproj | 1 - Source/Design/DzHTMLTextDesign_VCL.dproj | 1 - Source/Vcl.DHCommon.pas | 2 +- Source/Vcl.DzHTMLText.pas | 15 ++++++++++----- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CompInstall.ini b/CompInstall.ini index 04d6363..6c61f4e 100644 --- a/CompInstall.ini +++ b/CompInstall.ini @@ -3,7 +3,7 @@ IniVersion=2 [General] Name=Digao Dalpiaz - DzHTMLText component -Version=6.3 +Version=6.4 DelphiVersions=XE3;XE4;XE5;XE6;XE7;XE8;10;10.1;10.2;10.3;10.4;11;12 Packages=DzHTMLText_VCL;DzHTMLText_FMX;DzHTMLTextDesign_VCL;DzHTMLTextDesign_FMX AddLibrary=1 diff --git a/README.md b/README.md index 7975630..856711f 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,17 @@ ## What's New -- 03/25/2024 (Version 6.3) +- 03/26/2024 (Version 6.4) - - VCL font scaling review (Height is calculated by default screen PPI) + - Fix Delphi XE3 compiling (Design packages and FMX FillRect)
Click here to view the entire changelog +- 03/25/2024 (Version 6.3) + + - VCL font scaling review (Height is calculated by default screen PPI) + - 03/24/2024 (Version 6.2) - Better FMX design-time border (using the Delphi pattern). @@ -783,8 +787,8 @@ When you type Chinese, Japanese or Korean characters, this behavior is quite dif All measurements will be calculated based on the Design DPI (always 96 pixels per inch), and applied to the current Monitor DPI. Example: if you specified a tab width as 60 pixels, at 96 DPI, when displaying the text on a 120 DPI monitor, the tab width will be larger (75 pixels). For automatic scaling by DPI to work correctly, it is necessary to use Windows 8.1 or higher, and Delphi 10 or higher, or Lazarus. -If using Delphi previous version, the scaling will be based on default DPI (96). -If using Windows previous version, the scaling will be based on the default monitor DPI. +If using Delphi previous version, the scaling will be disabled. +If using Windows previous version, the scaling will be based on the default monitor DPI, and not on application current monitor. ### FMX diff --git a/Source/Design/DzHTMLTextDesign_FMX.dproj b/Source/Design/DzHTMLTextDesign_FMX.dproj index bc0e536..f933b2f 100644 --- a/Source/Design/DzHTMLTextDesign_FMX.dproj +++ b/Source/Design/DzHTMLTextDesign_FMX.dproj @@ -96,7 +96,6 @@ false RELEASE;$(DCC_Define) 0 - 0 true diff --git a/Source/Design/DzHTMLTextDesign_VCL.dproj b/Source/Design/DzHTMLTextDesign_VCL.dproj index d1971ae..01b251d 100644 --- a/Source/Design/DzHTMLTextDesign_VCL.dproj +++ b/Source/Design/DzHTMLTextDesign_VCL.dproj @@ -96,7 +96,6 @@ false RELEASE;$(DCC_Define) 0 - 0 true diff --git a/Source/Vcl.DHCommon.pas b/Source/Vcl.DHCommon.pas index c7196c5..3af6380 100644 --- a/Source/Vcl.DHCommon.pas +++ b/Source/Vcl.DHCommon.pas @@ -307,7 +307,7 @@ procedure GenericFillRect(Lb: TDzHTMLText; C: TCanvas; R: TAnyRect; FixPrecision C.FillRect( {$IFDEF FMX} - R, Lb.Opacity + R, 0, 0, [], Lb.Opacity {$ELSE} R {$ENDIF}); diff --git a/Source/Vcl.DzHTMLText.pas b/Source/Vcl.DzHTMLText.pas index e02560f..cd91677 100644 --- a/Source/Vcl.DzHTMLText.pas +++ b/Source/Vcl.DzHTMLText.pas @@ -29,7 +29,7 @@ interface {$ENDIF} {$ENDIF}; -const DZHTMLTEXT_INTERNAL_VERSION = 713; //Synchronizes TDam component +const DZHTMLTEXT_INTERNAL_VERSION = 714; //Synchronizes TDam component const _DEF_LISTLEVELPADDING = 20; @@ -679,7 +679,7 @@ implementation {$ENDIF} {$ENDIF}; -const STR_VERSION = '6.3'; +const STR_VERSION = '6.4'; const DEFAULT_PPI = 96; @@ -1282,7 +1282,7 @@ procedure TDzHTMLText.CanvasProcess(C: TCanvas); if Color<>clNone then begin C.Fill.Color := FColor; - C.FillRect(LocalRect, Opacity); + C.FillRect(LocalRect, 0, 0, [], Opacity); end; {$ELSE} if not FTransparent then @@ -1650,12 +1650,17 @@ procedure TDzHTMLText.CMMouseleave(var Message: TMessage); end; {$IFDEF VCL} -type THackForm = class(TCustomForm); //older Delphi version - Scaled is a protected property + {$IF (Defined(DCC) and (CompilerVersion >= 30)) or Defined(FPC)} //D10 Seattle or Lazarus + {$DEFINE PPI_SCALING} + {$ENDIF} +type THackForm = class(TCustomForm); //only in Delphi 11 the property "Scaled" is public (before is protected) function TDzHTMLText.CalcMulDiv(Size: Integer): Integer; +{$IFDEF PPI_SCALING} var MonitorPPI, DesignPPI: Integer; +{$ENDIF} begin - {$IF (Defined(DCC) and (CompilerVersion >= 30)) or Defined(FPC)} //D10 Seattle or Lazarus + {$IFDEF PPI_SCALING} if (ParentForm<>nil) and THackForm(ParentForm).Scaled {$IFDEF DCC}and not (csDesigning in ComponentState){$ENDIF} //design always based on Default PPI in Delphi then