Skip to content

Commit ca6535b

Browse files
Added RegisterThemeAttributes to Interface section to add custom styles (fixes #1)
1 parent 2590d57 commit ca6535b

40 files changed

+511
-376
lines changed

Demo/Projects/D10_4/ModernAppDemo.dproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,6 @@
166166
<BorlandProject>
167167
<Delphi.Personality>
168168
<Excluded_Packages>
169-
<Excluded_Packages Name="$(BDSBIN)\dclofficexp270.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
170-
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\dclISReportBuilder6_D10_4.bpl">Ethea InstantSolutions 6 ReportBuilder Components</Excluded_Packages>
171-
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\dclISRtl6D10_4.bpl">Ethea InstantSolutions 6 Rtl Library</Excluded_Packages>
172-
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\dclISVcl6_D10_4.bpl">Ethea InstantSolutions 6 Vcl Library</Excluded_Packages>
173-
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\dclISOpenOffice6_D10_4.bpl">Ethea InstantSolutions 6 LibreOffice/OpenOffice Components</Excluded_Packages>
174-
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\dclISFLib6_D10_4.bpl">Ethea InstantSolutions 6 Framework Library</Excluded_Packages>
175-
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k270.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
176169
</Excluded_Packages>
177170
<Source>
178171
<Source Name="MainSource">ModernAppDemo.dpr</Source>

Demo/Projects/D10_4/VCLThemeSelectorLauncher.dproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<DCC_S>false</DCC_S>
5555
<DCC_F>false</DCC_F>
5656
<DCC_K>false</DCC_K>
57-
<Custom_Styles>&quot;Aqua Light Slate|VCLSTYLE|$(BDSCOMMONDIR)\Styles\AquaLightSlate.vsf&quot;;CopperDark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\CopperDark.vsf;Glow|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Glow.vsf;&quot;Iceberg Classico|VCLSTYLE|$(BDSCOMMONDIR)\Styles\IcebergClassico.vsf&quot;;&quot;Lavender Classico|VCLSTYLE|$(BDSCOMMONDIR)\Styles\LavenderClassico.vsf&quot;;Sky|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Sky.vsf;&quot;Slate Classico|VCLSTYLE|$(BDSCOMMONDIR)\Styles\SlateClassico.vsf&quot;;&quot;Tablet Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\TabletDark.vsf&quot;;&quot;Tablet Light|VCLSTYLE|$(BDSCOMMONDIR)\Styles\TabletLight.vsf&quot;;Windows10|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10.vsf;&quot;Windows10 Blue|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Blue.vsf&quot;;&quot;Windows10 Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Dark.vsf&quot;;&quot;Windows10 Green|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Green.vsf&quot;;&quot;Windows10 Purple|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Purple.vsf&quot;;&quot;Windows10 SlateGray|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10SlateGray.vsf&quot;</Custom_Styles>
57+
<Custom_Styles>&quot;Aqua Light Slate|VCLSTYLE|$(BDSCOMMONDIR)\Styles\AquaLightSlate.vsf&quot;;CopperDark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\CopperDark.vsf;Glow|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Glow.vsf;&quot;Iceberg Classico|VCLSTYLE|$(BDSCOMMONDIR)\Styles\IcebergClassico.vsf&quot;;&quot;Lavender Classico|VCLSTYLE|$(BDSCOMMONDIR)\Styles\LavenderClassico.vsf&quot;;Sky|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Sky.vsf;&quot;Slate Classico|VCLSTYLE|$(BDSCOMMONDIR)\Styles\SlateClassico.vsf&quot;;&quot;Tablet Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\TabletDark.vsf&quot;;&quot;Tablet Light|VCLSTYLE|$(BDSCOMMONDIR)\Styles\TabletLight.vsf&quot;;Windows10|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10.vsf;&quot;Windows10 Blue|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Blue.vsf&quot;;&quot;Windows10 Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Dark.vsf&quot;;&quot;Windows10 Green|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Green.vsf&quot;;&quot;Windows10 Purple|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Purple.vsf&quot;;&quot;Windows10 SlateGray|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10SlateGray.vsf&quot;;&quot;Windows11 Modern Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows11_Modern_Dark.vsf&quot;;&quot;Windows11 Modern Light|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows11_Modern_Light.vsf&quot;</Custom_Styles>
5858
</PropertyGroup>
5959
<PropertyGroup Condition="'$(Base_Win32)'!=''">
6060
<VerInfo_Locale>1033</VerInfo_Locale>
@@ -129,8 +129,6 @@
129129
<Source Name="MainSource">VCLThemeSelectorLauncher.dpr</Source>
130130
</Source>
131131
<Excluded_Packages>
132-
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k270.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
133-
<Excluded_Packages Name="$(BDSBIN)\dclofficexp270.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
134132
</Excluded_Packages>
135133
</Delphi.Personality>
136134
<Deployment Version="3">
Binary file not shown.

Demo/Source/DImageCollections.dfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
object ImageCollectionDataModule: TImageCollectionDataModule
2+
OldCreateOrder = True
23
Height = 302
34
Width = 584
4-
PixelsPerInch = 144
55
object SVGIconImageCollection: TSVGIconImageCollection
66
SVGIconItems = <
77
item

Demo/Source/DImageCollections.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{ A full example of an HighDPI - VCL Themed enabled application }
44
{ See how to select the application Theme using VCLThemeSelector Form }
55
{ }
6-
{ Copyright (c) 2020, 2021 (Ethea S.r.l.) }
6+
{ Copyright (c) 2020-2022 (Ethea S.r.l.) }
77
{ Author: Carlo Barazzetta }
88
{ https://github.com/EtheaDev/VCLThemeSelector }
99
{ }

Demo/Source/EditForm.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{ A full example of an HighDPI - VCL Themed enabled application }
44
{ See how to select the application Theme using VCLThemeSelector Form }
55
{ }
6-
{ Copyright (c) 2020, 2021 (Ethea S.r.l.) }
6+
{ Copyright (c) 2020-2022 (Ethea S.r.l.) }
77
{ Author: Carlo Barazzetta }
88
{ https://github.com/EtheaDev/VCLThemeSelector }
99
{ }

Demo/Source/LauncherForm.pas

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{ VCLThemeSelector Launcher by Carlo Barazzetta }
33
{ A simple example to launch VCLThemeSelector }
44
{ }
5-
{ Copyright (c) 2020, 2021 (Ethea S.r.l.) }
5+
{ Copyright (c) 2020-2022 (Ethea S.r.l.) }
66
{ Author: Carlo Barazzetta }
77
{ https://github.com/EtheaDev/VCLThemeSelector }
88
{ }
@@ -113,4 +113,10 @@ procedure TLauncher.Loaded;
113113
inherited;
114114
end;
115115

116+
initialization
117+
//Example: how to add a new style not present into VCLThemeSelectorLauncher.InitDefaultThemesAttributes
118+
//download 'Radiant VCL Premium Style' from GetIt Package Manager and add to the
119+
//appearance section of this application
120+
RegisterThemeAttributes('Radiant', ttLight, clWebLightYellow, clWebLightgrey);
121+
116122
end.

Demo/Source/uSplitView.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{ A full example of an HighDPI - VCL Themed enabled application }
44
{ See how to select the application Theme using VCLThemeSelector Form }
55
{ }
6-
{ Copyright (c) 2020, 2021 (Ethea S.r.l.) }
6+
{ Copyright (c) 2020-2022 (Ethea S.r.l.) }
77
{ Author: Carlo Barazzetta }
88
{ https://github.com/EtheaDev/VCLThemeSelector }
99
{ }

Ext/VCLStyleUtils/Common/VCL.Styles.Utils.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//
1515
//
1616
// Portions created by Mahdi Safsafi [SMP3] e-mail SMP@LIVE.FR
17-
// Portions created by Rodrigo Ruz V. are Copyright (C) 2013-2020 Rodrigo Ruz V.
17+
// Portions created by Rodrigo Ruz V. are Copyright (C) 2013-2021 Rodrigo Ruz V.
1818
// All Rights Reserved.
1919
//
2020
//************************************************************************************************

Ext/VCLStyleUtils/Common/Vcl.PlatformVclStylesActnCtrls.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// The Original Code is Vcl.PlatformVclStylesActnCtrls
1616
//
1717
// The Initial Developer of the Original Code is Rodrigo Ruz V.
18-
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2020 Rodrigo Ruz V.
18+
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
1919
// All Rights Reserved.
2020
//
2121
//**************************************************************************************************
@@ -409,7 +409,7 @@ procedure TThemedDropDownButtonEx.DrawBackground(var PaintRect: TRect);
409409
const
410410
CheckedState: array[Boolean] of TThemedToolBar = (ttbButtonHot, ttbButtonCheckedHot);
411411
var
412-
LIndex : Integer;
412+
LIndex: Integer;
413413
begin
414414
LIndex := SaveDC(Canvas.Handle);
415415
try

Ext/VCLStyleUtils/Common/Vcl.Styles.ColorTabs.pas

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// The Original Code is Vcl.Styles.ColorTabs
1616
//
1717
// The Initial Developer of the Original Code is Rodrigo Ruz V.
18-
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2019 Rodrigo Ruz V.
18+
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
1919
// All Rights Reserved.
2020
//
2121
// **************************************************************************************************
@@ -84,9 +84,11 @@ TTabControlStyleHookHelper = class helper for TTabControlStyleHook
8484
End;
8585

8686
class function TCustomStyleEngineHelper.GetRegisteredStyleHooks
87-
: TStyleHookDictionary;
87+
: TStyleHookDictionary;
88+
{$IF (CompilerVersion >=31)}
8889
var
8990
p: Pointer;
91+
{$IFEND}
9092
begin
9193
{$IF (CompilerVersion <31)}
9294
Result := Self.FRegisteredStyleHooks;

Ext/VCLStyleUtils/Common/Vcl.Styles.ControlColor.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// The Original Code is Vcl.Styles.ControlColor
1616
//
1717
// The Initial Developer of the Original Code is Rodrigo Ruz V.
18-
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2019 Rodrigo Ruz V.
18+
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
1919
// All Rights Reserved.
2020
//
2121
//**************************************************************************************************

Ext/VCLStyleUtils/Common/Vcl.Styles.DPIAware.pas

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
TMyForm = class(TForm)
77
private
8-
FStyleDPIAwareness : TStyleDPIAwareness;
8+
FStyleDPIAwareness: TStyleDPIAwareness;
99
1010
procedure TFrmMain.FormCreate(Sender: TObject);
1111
begin
@@ -40,7 +40,7 @@ TMyForm = class(TForm)
4040
4141
procedure TFrmMain.FormCreate(Sender: TObject);
4242
Var
43-
StyleDPIAwareness : TStyleDPIAwareness;
43+
StyleDPIAwareness: TStyleDPIAwareness;
4444
begin
4545
StyleDPIAwareness := TStyleDPIAwareness.Create(Self);
4646
StyleDPIAwareness.Parent := Self;
@@ -75,10 +75,10 @@ TStyleDPI = class(TObject)
7575

7676
TStyleDPIAwareness = class(TControl)
7777
private
78-
FScaledStyles : TStringList;
79-
FRoundScalingFactor : Boolean;
80-
FUseCustomScalingFactor : Boolean;
81-
FCustomPPI : integer;
78+
FScaledStyles: TStringList;
79+
FRoundScalingFactor: Boolean;
80+
FUseCustomScalingFactor: Boolean;
81+
FCustomPPI: integer;
8282
FOldDPI: Integer;
8383
protected
8484
procedure CMStyleChanged(var Message: TMessage); message CM_STYLECHANGED;
@@ -88,14 +88,14 @@ TStyleDPIAwareness = class(TControl)
8888
destructor Destroy; override;
8989
procedure AfterDPIChange(OldDPI, NewDPI: Integer);
9090
procedure BeforeDPIChange(OldDPI, NewDPI: Integer);
91-
procedure ScaleStyle(Style : TCustomStyleServices);
91+
procedure ScaleStyle(Style: TCustomStyleServices);
9292
property OldDPI: Integer read FOldDPI write FOldDPI;
9393
published
94-
property RoundScalingFactor : Boolean read FRoundScalingFactor
94+
property RoundScalingFactor: Boolean read FRoundScalingFactor
9595
write FRoundScalingFactor default True;
96-
property UseCustomScalingFactor : Boolean read FUseCustomScalingFactor
96+
property UseCustomScalingFactor: Boolean read FUseCustomScalingFactor
9797
write FUseCustomScalingFactor default False;
98-
property CustomPPI : integer read FCustomPPI write FCustomPPI default 96;
98+
property CustomPPI: integer read FCustomPPI write FCustomPPI default 96;
9999
end;
100100

101101
implementation
@@ -141,7 +141,7 @@ constructor TStyleDPIAwareness.Create(AOwner: TComponent);
141141

142142
destructor TStyleDPIAwareness.Destroy;
143143
var
144-
i : Integer;
144+
i: Integer;
145145
begin
146146
for i := 0 to FScaledStyles.Count - 1 do
147147
TStyleDPI(FScaledStyles.Objects[i]).Free;
@@ -161,7 +161,7 @@ procedure TStyleDPIAwareness.BeforeDPIChange(OldDPI, NewDPI: Integer);
161161

162162
procedure TStyleDPIAwareness.RecreateForms;
163163
Var
164-
i : Integer;
164+
i: Integer;
165165
begin
166166
for i := 0 to Screen.FormCount - 1 do
167167
begin
@@ -172,19 +172,19 @@ procedure TStyleDPIAwareness.RecreateForms;
172172

173173
procedure TStyleDPIAwareness.ScaleStyle(Style: TCustomStyleServices);
174174
Var
175-
NewDPI : integer;
176-
SeStyle : TObject;
177-
SeStyleSource : TObject;
178-
BitmapList : TList;
179-
BitMap : TBitmap;
180-
StyleObjectList : Tlist;
175+
NewDPI: integer;
176+
SeStyle: TObject;
177+
SeStyleSource: TObject;
178+
BitmapList: TList;
179+
BitMap: TBitmap;
180+
StyleObjectList: Tlist;
181181
i,n: integer;
182-
StyleObject : TComponent;
182+
StyleObject: TComponent;
183183
obj: TStyleDPI;
184184

185-
procedure ProcessBitmapLink(BL : TObject);
185+
procedure ProcessBitmapLink(BL: TObject);
186186
Var
187-
BLType : TRTTIType;
187+
BLType: TRTTIType;
188188
begin
189189
BLType := TRttiContext.Create.GetType(BL.ClassType);
190190
BLType.GetProperty('Bottom').SetValue(BL, Round((BLType.GetProperty('Bottom').GetValue(BL).AsInteger * NewDPI - 1) / OldDPI));
@@ -193,7 +193,7 @@ procedure TStyleDPIAwareness.ScaleStyle(Style: TCustomStyleServices);
193193
BLType.GetProperty('Top').SetValue(BL, Round(BLType.GetProperty('Top').GetValue(BL).AsInteger * NewDPI / OldDPI));
194194
end;
195195

196-
procedure ProcessSO(aSO : TComponent; aSOType : TRTTIType);
196+
procedure ProcessSO(aSO: TComponent; aSOType: TRTTIType);
197197
begin
198198
aSOType.GetProperty('Top').SetValue(aSO, Round(aSOType.GetProperty('Top').GetValue(aSO).AsInteger * NewDPI / OldDPI));
199199
aSOType.GetProperty('Left').SetValue(aSO, Round(aSOType.GetProperty('Left').GetValue(aSO).AsInteger * NewDPI / OldDPI));
@@ -208,12 +208,12 @@ procedure TStyleDPIAwareness.ScaleStyle(Style: TCustomStyleServices);
208208
aSOType.GetProperty('TextMarginRight').SetValue(aSO, Round(aSOType.GetProperty('TextMarginRight').GetValue(aSO).AsInteger * NewDPI / OldDPI));
209209
end;
210210

211-
procedure ProcessStyleObject(SO : TComponent);
211+
procedure ProcessStyleObject(SO: TComponent);
212212
var
213213
i: integer;
214-
ChildSo : TComponent;
215-
SOType : TRTTIType;
216-
BitmapLink : TObject;
214+
ChildSo: TComponent;
215+
SOType: TRTTIType;
216+
BitmapLink: TObject;
217217
begin
218218
SOType := TRttiContext.Create.GetType(SO.ClassType);
219219
ProcessSO(SO, SOType);
@@ -318,14 +318,14 @@ procedure TStyleDPIAwareness.ScaleStyle(Style: TCustomStyleServices);
318318
TGetBorderSize = function: TRect of object;
319319

320320
TFormStyleHookFix = class helper for TFormStyleHook
321-
procedure SetStretchedCaptionInc(Value : Integer);
321+
procedure SetStretchedCaptionInc(Value: Integer);
322322
function GetBorderSizeAddr: Pointer;
323323
function Detour_GetBorderSize: TRect;
324324
end;
325325

326326
var
327-
Trampoline_TFormStyleHook_GetBorderSize : TGetBorderSize;
328-
Detour_TFormStyleHook_GetBorderSize : TGetBorderSize;
327+
Trampoline_TFormStyleHook_GetBorderSize: TGetBorderSize;
328+
Detour_TFormStyleHook_GetBorderSize: TGetBorderSize;
329329

330330

331331
{ TFormStyleHookFix }

Ext/VCLStyleUtils/Common/Vcl.Styles.DateTimePickers.pas

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// The Original Code is Vcl.Styles.DateTimePickers
1616
//
1717
// The Initial Developer of the Original Code is Rodrigo Ruz V.
18-
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2016 Rodrigo Ruz V.
18+
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
1919
// All Rights Reserved.
2020
//
2121
//**************************************************************************************************
@@ -66,8 +66,8 @@ TDateTimePickerStyleHookHelper = class helper for TDateTimePickerStyleHook
6666
procedure SetMouseOnButton(const Value: Boolean);
6767
public
6868
function GetButtonRect_: TRect;
69-
property _FDroppedDown : Boolean read GetDroppedDown Write SetDroppedDown;
70-
property _FMouseOnButton : Boolean read GetMouseOnButton Write SetMouseOnButton;
69+
property _FDroppedDown: Boolean read GetDroppedDown Write SetDroppedDown;
70+
property _FMouseOnButton: Boolean read GetMouseOnButton Write SetMouseOnButton;
7171
end;
7272

7373
{ TDateTimePickerStyleHookHelper }
@@ -99,8 +99,8 @@ procedure TDateTimePickerStyleHookHelper.SetMouseOnButton(const Value: Boolean);
9999
{ TDateTimePickerStyleHookFix }
100100
procedure TDateTimePickerStyleHookFix.SetColorsCalendar;
101101
Var
102-
LTextColor, LBackColor : TColor;
103-
LDateTimePicker : TDateTimePicker;
102+
LTextColor, LBackColor: TColor;
103+
LDateTimePicker: TDateTimePicker;
104104
begin
105105
LDateTimePicker:=TDateTimePicker(Control);
106106
//get the vcl styles colors
@@ -176,7 +176,7 @@ procedure TDateTimePickerStyleHookFix.WMPaint(var Message: TMessage);
176176
LPaintStruct: TPaintStruct;
177177
LRect: TRect;
178178
LDetails: TThemedElementDetails;
179-
sDateTime : string;
179+
sDateTime: string;
180180
begin
181181
DC := Message.WParam;
182182
LCanvas := TCanvas.Create;
@@ -203,8 +203,8 @@ procedure TDateTimePickerStyleHookFix.WMPaint(var Message: TMessage);
203203

204204
//only works for DateFormat = dfShort
205205
case TDateTimePicker(Control).Kind of
206-
dtkDate : sDateTime:=DateToStr(TDateTimePicker(Control).DateTime);
207-
dtkTime : sDateTime:=TimeToStr(TDateTimePicker(Control).DateTime);
206+
dtkDate: sDateTime:=DateToStr(TDateTimePicker(Control).DateTime);
207+
dtkTime: sDateTime:=TimeToStr(TDateTimePicker(Control).DateTime);
208208
end;
209209

210210
//draw the current date/time value

Ext/VCLStyleUtils/Common/Vcl.Styles.DbGrid.pas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// The Original Code is Vcl.Styles.DbGrid.pas.
1616
//
1717
// The Initial Developer of the Original Code is Rodrigo Ruz V.
18-
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2019 Rodrigo Ruz V.
18+
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
1919
// All Rights Reserved.
2020
//
2121
//**************************************************************************************************
@@ -57,7 +57,7 @@ TDbGridHelper = class helper for TCustomDBGrid
5757
function GetSelRow: Integer;
5858
procedure SetSelRow(const Value: Integer);
5959
public
60-
property TitleOffset : Byte read GetTitleOffset;
60+
property TitleOffset: Byte read GetTitleOffset;
6161
property Indicators: TCustomImageList read GetIndicators;
6262
property SelRow: Integer read GetSelRow write SetSelRow;
6363
end;
@@ -95,7 +95,7 @@ procedure _WriteText(ACanvas: TCanvas; ARect: TRect; DX, DY: Integer; const ATex
9595
if (ACanvas.CanvasOrientation = coRightToLeft) and (not ARightToLeft) then
9696
ChangeBiDiModeAlignment(Alignment);
9797
case Alignment of
98-
taLeftJustify : X := ARect.Left + DX;
98+
taLeftJustify: X := ARect.Left + DX;
9999
taRightJustify: X := ARect.Right - ACanvas.TextWidth(AText) - 3;
100100
else
101101
X := ARect.Left + (ARect.Right - ARect.Left) shr 1 - (ACanvas.TextWidth(AText) shr 1);

0 commit comments

Comments
 (0)