Skip to content

Commit 3b80b09

Browse files
author
Carlo Barazzetta
committed
ver. 2.4.1
- Used new "modern" Styles available in Delphi 13. - Added FrameViewer Package in package groups
1 parent 0cc8f60 commit 3b80b09

28 files changed

Lines changed: 1497 additions & 1048 deletions

Demo/Help/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ The integration was tested from **Delphi XE6** to **Delphi 13**: for older versi
88

99
Use MarkdownHelpViewer.pas (located into AppInterface folder) in dpr:
1010

11-
```Delphi
11+
```Pascal
1212
MarkdownHelpViewer in '..\..\AppInterface\MarkDownHelpViewer.pas',
1313
```
1414

1515
then specify the default file of the help:
1616

17-
```Delphi
17+
```Pascal
1818
Application.HelpFile := ExtractFilePath(Application.ExeName)+'..\Help\Home.md';
1919
```
2020

@@ -27,7 +27,7 @@ so the interface can launch the viewer automatically.
2727

2828
If you don't want to use the provided Setup you can register the location of the Viewer built by yourself and deployed to a specific location, for example:
2929

30-
```Delphi
30+
```Pascal
3131
{$IFDEF WIN32}
3232
RegisterMDViewerLocation(ExtractFilePath(Application.ExeName)+
3333
'..\..\Bin32\MDHelpViewer.exe');
@@ -40,7 +40,7 @@ If you don't want to use the provided Setup you can register the location of the
4040

4141
To test the application you can lauch the Home.md help using the menu About/Help: in the OnClick handler invoke the help:
4242

43-
```Delphi
43+
```Pascal
4444
procedure TfmMain.HelpMenuItemClick(Sender: TObject);
4545
begin
4646
Application.HelpKeyword('home');
@@ -53,7 +53,7 @@ When the user press "F1" inside the application, the HelpSystem is invoked with
5353

5454
Then the interface searches in the same folder of default file (specified into Application.HelpFile) the specific file using those rules:
5555

56-
#### Rules of precedence:
56+
#### Rules of precedence to search filed based on Help keyword or Help Context:
5757

5858
- first search a file named as the Keyword or the Context with any markdown extension (eg. 1000.md, MainForm.md)
5959
- Then, try the Help Name and the Keyword (eg.Home1000.md, HomeMainForm.md)

Ext/HTMLViewer/package/Rad Studio 13/FrameViewer.dproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<TargetedPlatforms>3</TargetedPlatforms>
88
<AppType>Package</AppType>
99
<FrameworkType>VCL</FrameworkType>
10-
<ProjectVersion>20.3</ProjectVersion>
10+
<ProjectVersion>20.4</ProjectVersion>
1111
<Platform Condition="'$(Platform)'==''">Win32</Platform>
1212
<ProjectName Condition="'$(ProjectName)'==''">FrameViewer</ProjectName>
1313
</PropertyGroup>

Ext/SVGIconImageList/Source/FMX.SVGIconImageList.pas

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ interface
4747
;
4848

4949
const
50-
SVGIconImageListVersion = '4.6.3';
50+
SVGIconImageListVersion = '4.7.2';
5151
DEFAULT_SIZE = 32;
5252
ZOOM_DEFAULT = 100;
5353
SVG_INHERIT_COLOR = TAlphaColors.Null;
@@ -307,8 +307,12 @@ procedure TSVGIconBitmapItem.DrawSVGIcon;
307307

308308
function TSVGIconBitmapItem.GetBitmap: TBitmapOfItem;
309309
begin
310-
DrawSVGIcon;
311310
Result := inherited Bitmap;
311+
//Draw SVG Icon only if not already drawn at the correct size
312+
//to prevent infinite notification loop (DoChange/ClearCache/Timer cycle)
313+
if (Result.Width <> Round(FWidth * Scale)) or
314+
(Result.Height <> Round(FHeight * Scale)) then
315+
DrawSVGIcon;
312316
end;
313317

314318
function TSVGIconBitmapItem.GetDisplayName: string;
@@ -674,6 +678,8 @@ function TSVGIconImageList.InsertIcon(const AIndex: Integer;
674678
var
675679
LItem: TSVGIconSourceItem;
676680
LDest: TCustomDestinationItem;
681+
LIconName: string;
682+
LCount: Integer;
677683
begin
678684
LItem := Self.Source.Insert(AIndex) as TSVGIconSourceItem;
679685
Result := LItem;
@@ -682,7 +688,20 @@ function TSVGIconImageList.InsertIcon(const AIndex: Integer;
682688
LDest := Self.Destination.Insert(AIndex);
683689
if AIconName <> '' then
684690
begin
685-
LItem.Name := AIconName;
691+
LCount := 1;
692+
LIconName := AIconName;
693+
//Check dup Names
694+
while true do
695+
begin
696+
if GetIconByName(LIconName) = nil then
697+
break
698+
else
699+
begin
700+
LIconName := AIconName+IntToStr(LCount);
701+
Inc(LCount)
702+
end;
703+
end;
704+
LItem.Name := LIconName;
686705
with LDest.Layers.Add do
687706
Name := AIconName;
688707
end;

Ext/SVGIconImageList/Source/SVGIconImageListBase.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ interface
4949
/// <summary>
5050
/// Current version of the SVGIconImageList library.
5151
/// </summary>
52-
SVGIconImageListVersion = '4.6.3';
52+
SVGIconImageListVersion = '4.7.2';
5353

5454
/// <summary>
5555
/// Default size (width and height) for icons in pixels.

Ext/StyledComponents/source/Vcl.ButtonStylesAttributes.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ interface
5656

5757
const
5858
/// <summary>Current version of the StyledComponents library</summary>
59-
StyledComponentsVersion = '3.9.3';
59+
StyledComponentsVersion = '4.0.0';
6060
/// <summary>Default corner radius for rounded buttons in pixels</summary>
6161
DEFAULT_RADIUS = 6;
6262
/// <summary>Resource name for the Windows shield admin icon</summary>

Ext/StyledComponents/source/Vcl.StandardButtonStyles.pas

Lines changed: 98 additions & 65 deletions
Large diffs are not rendered by default.

Ext/StyledComponents/source/Vcl.StyledButton.pas

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,7 @@ function TStyledButtonRender.ApplyButtonStyle: Boolean;
23102310
begin
23112311
if AsVCLStyle then
23122312
begin
2313-
//if StyleElements contains seClient then use
2313+
//if StyleElements contains seBorder then use
23142314
//VCL Style assigned to Button or Global VCL Style
23152315
if seBorder in FOwnerControl.StyleElements then
23162316
LStyleAppearance := DEFAULT_APPEARANCE;
@@ -3935,8 +3935,6 @@ procedure TStyledButtonRender.SetStyleClass(
39353935
begin
39363936
if (LValue <> DEFAULT_WINDOWS_CLASS) then
39373937
FOwnerControl.StyleElements := FOwnerControl.StyleElements - [seClient];
3938-
// else
3939-
// LValue := GetActiveStyleName;
39403938
if LValue = '' then
39413939
LValue := DEFAULT_WINDOWS_CLASS;
39423940
end;
@@ -4008,7 +4006,7 @@ procedure TStyledButtonRender.Loaded;
40084006
begin
40094007
inherited;
40104008
SetImageIndex(ImageIndex);
4011-
if not FStyleApplied (*and not HasCustomAttributes*) then
4009+
if not FStyleApplied then
40124010
begin
40134011
StyleFamilyUpdateAttributesByModalResult(FModalResult,
40144012
FStyleFamily, FStyleClass, FStyleAppearance);

0 commit comments

Comments
 (0)