Skip to content

Commit e61039a

Browse files
version 3.4.2
- New packages for Delphi 12.1 - Added support for new Delphi 12.1 Styles (Windows11 Impressive Dark/Light) - Added Interposer Unit (Vcl.StyledMessagesHooks.pas) for Messages - Fixed StyledButtonGroup e StyledCategoryButtons
1 parent 80ecd34 commit e61039a

File tree

8 files changed

+56
-31
lines changed

8 files changed

+56
-31
lines changed
Binary file not shown.

Demos/StyledButtonsDemo/MainFormTest.dfm

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ object TestMainForm: TTestMainForm
22
Left = 0
33
Top = 0
44
Caption = 'Styled Button Test (c) Copyright Ethea S.r.l.'
5-
ClientHeight = 641
5+
ClientHeight = 681
66
ClientWidth = 988
77
Color = clWindow
88
Font.Charset = DEFAULT_CHARSET
@@ -19,7 +19,7 @@ object TestMainForm: TTestMainForm
1919
object TopPanel: TPanel
2020
Left = 0
2121
Top = 0
22-
Width = 984
22+
Width = 988
2323
Height = 65
2424
Align = alTop
2525
Color = clGray
@@ -119,17 +119,19 @@ object TestMainForm: TTestMainForm
119119
Left = 0
120120
Top = 65
121121
Width = 489
122-
Height = 575
122+
Height = 616
123123
Align = alLeft
124124
TabOrder = 1
125+
ExplicitHeight = 576
125126
object LeftScrollBox: TScrollBox
126127
Left = 1
127128
Top = 25
128129
Width = 487
129-
Height = 549
130+
Height = 590
130131
Align = alClient
131132
TabOrder = 0
132133
OnMouseWheel = ScrollBoxMouseWheel
134+
ExplicitHeight = 550
133135
end
134136
object Panel1: TPanel
135137
Left = 1
@@ -144,23 +146,25 @@ object TestMainForm: TTestMainForm
144146
object RightPanel: TPanel
145147
Left = 489
146148
Top = 65
147-
Width = 495
148-
Height = 575
149+
Width = 499
150+
Height = 616
149151
Align = alClient
150152
TabOrder = 2
153+
ExplicitHeight = 576
151154
object RightScrollBox: TScrollBox
152155
Left = 1
153156
Top = 25
154-
Width = 493
155-
Height = 549
157+
Width = 497
158+
Height = 590
156159
Align = alClient
157160
TabOrder = 0
158161
OnMouseWheel = ScrollBoxMouseWheel
162+
ExplicitHeight = 550
159163
end
160164
object TopRightPanel: TPanel
161165
Left = 1
162166
Top = 1
163-
Width = 493
167+
Width = 497
164168
Height = 24
165169
Align = alTop
166170
Caption =

README.htm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</style>
3232
<h1>Delphi VCL StyledComponents <a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg" alt="License"/></a></h1>
3333
<h2>Components similar to Delphi VCL Buttons, Toolbar, DbNavigator, BindNavigator, ButtonGroup and CategoryButtons with Custom Graphic Styles, and an advanced, full-customizable TaskDialog, also with animations!</h2>
34-
<h3>Actual official version: 3.4.1</h3>
34+
<h3>Actual official version: 3.4.2</h3>
3535
<h2>List of available Components:</h2>
3636
<table>
3737
<tr>
@@ -298,6 +298,13 @@ <h3>Available from Delphi XE6 to Delphi 12 (32bit and 64bit platforms)</h3>
298298
<p><img src="./Images/SupportingDelphi.jpg" alt="Delphi Support"/></p>
299299
<p>Related links: <a href="https://www.embarcadero.com">embarcadero.com</a> - <a href="https://learndelphi.org">learndelphi.org</a></p>
300300
<h3>RELEASE NOTES</h3>
301+
<p>7 Apr 2024: version 3.4.2</p>
302+
<ul>
303+
<li>New packages for Delphi 12.1</li>
304+
<li>Added support for new Delphi 12.1 Styles (Windows11 Impressive Dark/Light)</li>
305+
<li>Added Interposer Unit (Vcl.StyledMessagesHooks.pas) for Messages</li>
306+
<li>Fixed StyledButtonGroup e StyledCategoryButtons</li>
307+
</ul>
301308
<p>5 Apr 2024: version 3.4.1</p>
302309
<ul>
303310
<li>Added StyledCategoryButtons Component</li>

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Components similar to Delphi VCL Buttons, Toolbar, DbNavigator, BindNavigator, ButtonGroup and CategoryButtons with Custom Graphic Styles, and an advanced, full-customizable TaskDialog, also with animations!
44

5-
### Actual official version: 3.4.1
5+
### Actual official version: 3.4.2
66

77
## List of available Components:
88
| Component | Description |
@@ -325,6 +325,12 @@ If you are have Skia4Delphi installed, you can also try the AnimatedTaskDialogDe
325325
Related links: [embarcadero.com](https://www.embarcadero.com) - [learndelphi.org](https://learndelphi.org)
326326

327327
### RELEASE NOTES
328+
7 Apr 2024: version 3.4.2
329+
- New packages for Delphi 12.1
330+
- Added support for new Delphi 12.1 Styles (Windows11 Impressive Dark/Light)
331+
- Added Interposer Unit (Vcl.StyledMessagesHooks.pas) for Messages
332+
- Fixed StyledButtonGroup e StyledCategoryButtons
333+
328334
5 Apr 2024: version 3.4.1
329335
- Added StyledCategoryButtons Component
330336
- Added StyledCategoryButtons Demo

source/Vcl.StandardButtonStyles.pas

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,18 @@ procedure InitDefaultThemesAttributes;
607607
RegisterThemeAttributes('Zircon SE',ttLight,clBlack,clBlack,
608608
htmlToColor('#e5e8e9'),htmlToColor('#a0d4de'),
609609
htmlToColor('#e5e8e9'),htmlToColor('#a0d4de'),btRoundRect);
610+
RegisterThemeAttributes('Windows11 Impressive Dark',ttDark,clWhite,clWhite,
611+
htmlToColor('#3F506D'),htmlToColor('#5172EF'),
612+
htmlToColor('#3F506D'),htmlToColor('#5172EF'),btRoundRect);
613+
RegisterThemeAttributes('Windows11 Impressive Dark SE',ttDark,clWhite,clWhite,
614+
htmlToColor('#3F506D'),htmlToColor('#5172EF'),
615+
htmlToColor('#3F506D'),htmlToColor('#5172EF'),btRoundRect);
616+
RegisterThemeAttributes('Windows11 Impressive Light',ttLight,clBlack,clWhite,
617+
htmlToColor('#CAD4E6'),htmlToColor('#5172EF'),
618+
htmlToColor('#CAD4E6'),htmlToColor('#5172EF'),btRoundRect);
619+
RegisterThemeAttributes('Windows11 Impressive Light SE',ttLight,clBlack,clWhite,
620+
htmlToColor('#CAD4E6'),htmlToColor('#5172EF'),
621+
htmlToColor('#CAD4E6'),htmlToColor('#5172EF'),btRoundRect);
610622
end;
611623

612624
//IDE Styled

source/Vcl.StyledButtonGroup.pas

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -823,9 +823,6 @@ function TStyledButtonGroup.ApplyButtonStyle: Boolean;
823823
FButtonStyleSelected,
824824
FButtonStyleHot,
825825
FButtonStyleDisabled);
826-
827-
if not FCustomDrawType then
828-
FStyleDrawType := FButtonStyleNormal.DrawType;
829826
end;
830827
StyleClass := LStyleClass;
831828
StyleAppearance := LStyleAppearance;
@@ -930,9 +927,6 @@ function TStyledButtonGroup.ApplyButtonGroupStyle: Boolean;
930927
FButtonStyleSelected,
931928
FButtonStyleHot,
932929
FButtonStyleDisabled);
933-
934-
if not FCustomDrawType then
935-
FStyleDrawType := FButtonStyleNormal.DrawType;
936930
end;
937931
Invalidate;
938932
end;

source/Vcl.StyledCategoryButtons.pas

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -810,9 +810,6 @@ function TStyledCategoryButtons.ApplyButtonStyle: Boolean;
810810
FButtonStyleSelected,
811811
FButtonStyleHot,
812812
FButtonStyleDisabled);
813-
814-
if not FCustomDrawType then
815-
FStyleDrawType := FButtonStyleNormal.DrawType;
816813
end;
817814
StyleClass := LStyleClass;
818815
StyleAppearance := LStyleAppearance;
@@ -922,9 +919,6 @@ function TStyledCategoryButtons.ApplyCategoryButtonsStyle: Boolean;
922919
FButtonStyleSelected,
923920
FButtonStyleHot,
924921
FButtonStyleDisabled);
925-
926-
if not FCustomDrawType then
927-
FStyleDrawType := FButtonStyleNormal.DrawType;
928922
end;
929923
Invalidate;
930924
end;

source/Vcl.StyledToolbar.pas

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ TStyledToolButton = class(TCustomStyledGraphicButton)
9999
function GetWrap: Boolean;
100100
procedure SetWrap(const AValue: Boolean);
101101
procedure UpdateGroupIndex;
102+
function GetStyleDrawType: TStyledButtonDrawType;
103+
procedure SetStyleDrawType(const AValue: TStyledButtonDrawType);
102104
protected
103105
FToolBar: TStyledToolBar;
104106
function GetCaption: TCaption; override;
@@ -190,7 +192,7 @@ TStyledToolButton = class(TCustomStyledGraphicButton)
190192
property Tag;
191193
//StyledComponents Attributes
192194
property StyleRadius stored IsCustomRadius;
193-
property StyleDrawType stored IsCustomDrawType;
195+
property StyleDrawType: TStyledButtonDrawType read GetStyleDrawType write SetStyleDrawType stored IsCustomDrawType;
194196
property StyleFamily stored IsStoredStyleFamily;
195197
property StyleClass stored IsStoredStyleClass;
196198
property StyleAppearance stored IsStoredStyleAppearance;
@@ -564,6 +566,11 @@ function TStyledToolButton.GetIndex: Integer;
564566
Result := -1;
565567
end;
566568

569+
function TStyledToolButton.GetStyleDrawType: TStyledButtonDrawType;
570+
begin
571+
Result := inherited StyleDrawType;
572+
end;
573+
567574
function TStyledToolButton.GetText: TCaption;
568575
begin
569576
if Assigned(FToolBar) and not (FToolBar.ShowCaptions) then
@@ -944,11 +951,19 @@ procedure TStyledToolButton.SetStyle(AValue: TToolButtonStyle);
944951
if IsSeparator <> WasSeparator then
945952
begin
946953
Width := DEFAULT_SEP_WIDTH;
954+
StyleDrawType := StyleDrawType;
947955
end;
948956
UpdateButtonContent;
949957
end;
950958
end;
951959

960+
procedure TStyledToolButton.SetStyleDrawType(
961+
const AValue: TStyledButtonDrawType);
962+
begin
963+
if not IsSeparator then
964+
inherited StyleDrawType := AValue;
965+
end;
966+
952967
procedure TStyledToolButton.SetToolBar(AToolBar: TStyledToolBar);
953968
begin
954969
if FToolBar <> AToolBar then
@@ -1640,13 +1655,6 @@ function TStyledToolbar.ApplyToolbarStyle: Boolean;
16401655
LAttributesOther,
16411656
LAttributesOther,
16421657
LAttributesOther);
1643-
(*
1644-
if not FCustomDrawType then
1645-
begin
1646-
FStyleDrawType := LAttributesNormal.DrawType;
1647-
FCustomDrawType := False;
1648-
end;
1649-
*)
16501658
finally
16511659
LAttributesNormal.Free;
16521660
LAttributesOther.Free;

0 commit comments

Comments
 (0)