Skip to content

Commit

Permalink
version 6.4 - old delphis packages attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
digao-dalpiaz committed Mar 27, 2024
1 parent 9231a0f commit 8f75e68
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CompInstall.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<details>
<summary>Click here to view the entire changelog</summary>

- 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).
Expand Down Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion Source/Design/DzHTMLTextDesign_FMX.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>0</DCC_DebugInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
Expand Down
1 change: 0 additions & 1 deletion Source/Design/DzHTMLTextDesign_VCL.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>0</DCC_DebugInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
Expand Down
2 changes: 1 addition & 1 deletion Source/Vcl.DHCommon.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down
15 changes: 10 additions & 5 deletions Source/Vcl.DzHTMLText.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -679,7 +679,7 @@ implementation
{$ENDIF}
{$ENDIF};

const STR_VERSION = '6.3';
const STR_VERSION = '6.4';

const DEFAULT_PPI = 96;

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8f75e68

Please sign in to comment.