Skip to content

Commit

Permalink
Added RegisterThemeAttributes to Interface section to add custom styl…
Browse files Browse the repository at this point in the history
…es (fixes #1)
  • Loading branch information
carloBarazzetta committed Jan 28, 2022
1 parent 2590d57 commit ca6535b
Show file tree
Hide file tree
Showing 40 changed files with 511 additions and 376 deletions.
7 changes: 0 additions & 7 deletions Demo/Projects/D10_4/ModernAppDemo.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,6 @@
<BorlandProject>
<Delphi.Personality>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp270.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\dclISReportBuilder6_D10_4.bpl">Ethea InstantSolutions 6 ReportBuilder Components</Excluded_Packages>
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\dclISRtl6D10_4.bpl">Ethea InstantSolutions 6 Rtl Library</Excluded_Packages>
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\dclISVcl6_D10_4.bpl">Ethea InstantSolutions 6 Vcl Library</Excluded_Packages>
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\dclISOpenOffice6_D10_4.bpl">Ethea InstantSolutions 6 LibreOffice/OpenOffice Components</Excluded_Packages>
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\dclISFLib6_D10_4.bpl">Ethea InstantSolutions 6 Framework Library</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k270.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
<Source>
<Source Name="MainSource">ModernAppDemo.dpr</Source>
Expand Down
4 changes: 1 addition & 3 deletions Demo/Projects/D10_4/VCLThemeSelectorLauncher.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<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>
<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>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<VerInfo_Locale>1033</VerInfo_Locale>
Expand Down Expand Up @@ -129,8 +129,6 @@
<Source Name="MainSource">VCLThemeSelectorLauncher.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k270.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp270.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="3">
Expand Down
Binary file modified Demo/Projects/D10_4/VCLThemeSelectorLauncher.res
Binary file not shown.
2 changes: 1 addition & 1 deletion Demo/Source/DImageCollections.dfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object ImageCollectionDataModule: TImageCollectionDataModule
OldCreateOrder = True
Height = 302
Width = 584
PixelsPerInch = 144
object SVGIconImageCollection: TSVGIconImageCollection
SVGIconItems = <
item
Expand Down
2 changes: 1 addition & 1 deletion Demo/Source/DImageCollections.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{ A full example of an HighDPI - VCL Themed enabled application }
{ See how to select the application Theme using VCLThemeSelector Form }
{ }
{ Copyright (c) 2020, 2021 (Ethea S.r.l.) }
{ Copyright (c) 2020-2022 (Ethea S.r.l.) }
{ Author: Carlo Barazzetta }
{ https://github.com/EtheaDev/VCLThemeSelector }
{ }
Expand Down
2 changes: 1 addition & 1 deletion Demo/Source/EditForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{ A full example of an HighDPI - VCL Themed enabled application }
{ See how to select the application Theme using VCLThemeSelector Form }
{ }
{ Copyright (c) 2020, 2021 (Ethea S.r.l.) }
{ Copyright (c) 2020-2022 (Ethea S.r.l.) }
{ Author: Carlo Barazzetta }
{ https://github.com/EtheaDev/VCLThemeSelector }
{ }
Expand Down
8 changes: 7 additions & 1 deletion Demo/Source/LauncherForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{ VCLThemeSelector Launcher by Carlo Barazzetta }
{ A simple example to launch VCLThemeSelector }
{ }
{ Copyright (c) 2020, 2021 (Ethea S.r.l.) }
{ Copyright (c) 2020-2022 (Ethea S.r.l.) }
{ Author: Carlo Barazzetta }
{ https://github.com/EtheaDev/VCLThemeSelector }
{ }
Expand Down Expand Up @@ -113,4 +113,10 @@ procedure TLauncher.Loaded;
inherited;
end;

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

end.
2 changes: 1 addition & 1 deletion Demo/Source/uSplitView.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{ A full example of an HighDPI - VCL Themed enabled application }
{ See how to select the application Theme using VCLThemeSelector Form }
{ }
{ Copyright (c) 2020, 2021 (Ethea S.r.l.) }
{ Copyright (c) 2020-2022 (Ethea S.r.l.) }
{ Author: Carlo Barazzetta }
{ https://github.com/EtheaDev/VCLThemeSelector }
{ }
Expand Down
2 changes: 1 addition & 1 deletion Ext/VCLStyleUtils/Common/VCL.Styles.Utils.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
//
// Portions created by Mahdi Safsafi [SMP3] e-mail [email protected]
// Portions created by Rodrigo Ruz V. are Copyright (C) 2013-2020 Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2013-2021 Rodrigo Ruz V.
// All Rights Reserved.
//
//************************************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions Ext/VCLStyleUtils/Common/Vcl.PlatformVclStylesActnCtrls.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// The Original Code is Vcl.PlatformVclStylesActnCtrls
//
// The Initial Developer of the Original Code is Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2020 Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
// All Rights Reserved.
//
//**************************************************************************************************
Expand Down Expand Up @@ -409,7 +409,7 @@ procedure TThemedDropDownButtonEx.DrawBackground(var PaintRect: TRect);
const
CheckedState: array[Boolean] of TThemedToolBar = (ttbButtonHot, ttbButtonCheckedHot);
var
LIndex : Integer;
LIndex: Integer;
begin
LIndex := SaveDC(Canvas.Handle);
try
Expand Down
6 changes: 4 additions & 2 deletions Ext/VCLStyleUtils/Common/Vcl.Styles.ColorTabs.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// The Original Code is Vcl.Styles.ColorTabs
//
// The Initial Developer of the Original Code is Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2019 Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
// All Rights Reserved.
//
// **************************************************************************************************
Expand Down Expand Up @@ -84,9 +84,11 @@ TTabControlStyleHookHelper = class helper for TTabControlStyleHook
End;

class function TCustomStyleEngineHelper.GetRegisteredStyleHooks
: TStyleHookDictionary;
: TStyleHookDictionary;
{$IF (CompilerVersion >=31)}
var
p: Pointer;
{$IFEND}
begin
{$IF (CompilerVersion <31)}
Result := Self.FRegisteredStyleHooks;
Expand Down
2 changes: 1 addition & 1 deletion Ext/VCLStyleUtils/Common/Vcl.Styles.ControlColor.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// The Original Code is Vcl.Styles.ControlColor
//
// The Initial Developer of the Original Code is Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2019 Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
// All Rights Reserved.
//
//**************************************************************************************************
Expand Down
58 changes: 29 additions & 29 deletions Ext/VCLStyleUtils/Common/Vcl.Styles.DPIAware.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
TMyForm = class(TForm)
private
FStyleDPIAwareness : TStyleDPIAwareness;
FStyleDPIAwareness: TStyleDPIAwareness;
procedure TFrmMain.FormCreate(Sender: TObject);
begin
Expand Down Expand Up @@ -40,7 +40,7 @@ TMyForm = class(TForm)
procedure TFrmMain.FormCreate(Sender: TObject);
Var
StyleDPIAwareness : TStyleDPIAwareness;
StyleDPIAwareness: TStyleDPIAwareness;
begin
StyleDPIAwareness := TStyleDPIAwareness.Create(Self);
StyleDPIAwareness.Parent := Self;
Expand Down Expand Up @@ -75,10 +75,10 @@ TStyleDPI = class(TObject)

TStyleDPIAwareness = class(TControl)
private
FScaledStyles : TStringList;
FRoundScalingFactor : Boolean;
FUseCustomScalingFactor : Boolean;
FCustomPPI : integer;
FScaledStyles: TStringList;
FRoundScalingFactor: Boolean;
FUseCustomScalingFactor: Boolean;
FCustomPPI: integer;
FOldDPI: Integer;
protected
procedure CMStyleChanged(var Message: TMessage); message CM_STYLECHANGED;
Expand All @@ -88,14 +88,14 @@ TStyleDPIAwareness = class(TControl)
destructor Destroy; override;
procedure AfterDPIChange(OldDPI, NewDPI: Integer);
procedure BeforeDPIChange(OldDPI, NewDPI: Integer);
procedure ScaleStyle(Style : TCustomStyleServices);
procedure ScaleStyle(Style: TCustomStyleServices);
property OldDPI: Integer read FOldDPI write FOldDPI;
published
property RoundScalingFactor : Boolean read FRoundScalingFactor
property RoundScalingFactor: Boolean read FRoundScalingFactor
write FRoundScalingFactor default True;
property UseCustomScalingFactor : Boolean read FUseCustomScalingFactor
property UseCustomScalingFactor: Boolean read FUseCustomScalingFactor
write FUseCustomScalingFactor default False;
property CustomPPI : integer read FCustomPPI write FCustomPPI default 96;
property CustomPPI: integer read FCustomPPI write FCustomPPI default 96;
end;

implementation
Expand Down Expand Up @@ -141,7 +141,7 @@ constructor TStyleDPIAwareness.Create(AOwner: TComponent);

destructor TStyleDPIAwareness.Destroy;
var
i : Integer;
i: Integer;
begin
for i := 0 to FScaledStyles.Count - 1 do
TStyleDPI(FScaledStyles.Objects[i]).Free;
Expand All @@ -161,7 +161,7 @@ procedure TStyleDPIAwareness.BeforeDPIChange(OldDPI, NewDPI: Integer);

procedure TStyleDPIAwareness.RecreateForms;
Var
i : Integer;
i: Integer;
begin
for i := 0 to Screen.FormCount - 1 do
begin
Expand All @@ -172,19 +172,19 @@ procedure TStyleDPIAwareness.RecreateForms;

procedure TStyleDPIAwareness.ScaleStyle(Style: TCustomStyleServices);
Var
NewDPI : integer;
SeStyle : TObject;
SeStyleSource : TObject;
BitmapList : TList;
BitMap : TBitmap;
StyleObjectList : Tlist;
NewDPI: integer;
SeStyle: TObject;
SeStyleSource: TObject;
BitmapList: TList;
BitMap: TBitmap;
StyleObjectList: Tlist;
i,n: integer;
StyleObject : TComponent;
StyleObject: TComponent;
obj: TStyleDPI;

procedure ProcessBitmapLink(BL : TObject);
procedure ProcessBitmapLink(BL: TObject);
Var
BLType : TRTTIType;
BLType: TRTTIType;
begin
BLType := TRttiContext.Create.GetType(BL.ClassType);
BLType.GetProperty('Bottom').SetValue(BL, Round((BLType.GetProperty('Bottom').GetValue(BL).AsInteger * NewDPI - 1) / OldDPI));
Expand All @@ -193,7 +193,7 @@ procedure TStyleDPIAwareness.ScaleStyle(Style: TCustomStyleServices);
BLType.GetProperty('Top').SetValue(BL, Round(BLType.GetProperty('Top').GetValue(BL).AsInteger * NewDPI / OldDPI));
end;

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

procedure ProcessStyleObject(SO : TComponent);
procedure ProcessStyleObject(SO: TComponent);
var
i: integer;
ChildSo : TComponent;
SOType : TRTTIType;
BitmapLink : TObject;
ChildSo: TComponent;
SOType: TRTTIType;
BitmapLink: TObject;
begin
SOType := TRttiContext.Create.GetType(SO.ClassType);
ProcessSO(SO, SOType);
Expand Down Expand Up @@ -318,14 +318,14 @@ procedure TStyleDPIAwareness.ScaleStyle(Style: TCustomStyleServices);
TGetBorderSize = function: TRect of object;

TFormStyleHookFix = class helper for TFormStyleHook
procedure SetStretchedCaptionInc(Value : Integer);
procedure SetStretchedCaptionInc(Value: Integer);
function GetBorderSizeAddr: Pointer;
function Detour_GetBorderSize: TRect;
end;

var
Trampoline_TFormStyleHook_GetBorderSize : TGetBorderSize;
Detour_TFormStyleHook_GetBorderSize : TGetBorderSize;
Trampoline_TFormStyleHook_GetBorderSize: TGetBorderSize;
Detour_TFormStyleHook_GetBorderSize: TGetBorderSize;


{ TFormStyleHookFix }
Expand Down
16 changes: 8 additions & 8 deletions Ext/VCLStyleUtils/Common/Vcl.Styles.DateTimePickers.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// The Original Code is Vcl.Styles.DateTimePickers
//
// The Initial Developer of the Original Code is Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2016 Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
// All Rights Reserved.
//
//**************************************************************************************************
Expand Down Expand Up @@ -66,8 +66,8 @@ TDateTimePickerStyleHookHelper = class helper for TDateTimePickerStyleHook
procedure SetMouseOnButton(const Value: Boolean);
public
function GetButtonRect_: TRect;
property _FDroppedDown : Boolean read GetDroppedDown Write SetDroppedDown;
property _FMouseOnButton : Boolean read GetMouseOnButton Write SetMouseOnButton;
property _FDroppedDown: Boolean read GetDroppedDown Write SetDroppedDown;
property _FMouseOnButton: Boolean read GetMouseOnButton Write SetMouseOnButton;
end;

{ TDateTimePickerStyleHookHelper }
Expand Down Expand Up @@ -99,8 +99,8 @@ procedure TDateTimePickerStyleHookHelper.SetMouseOnButton(const Value: Boolean);
{ TDateTimePickerStyleHookFix }
procedure TDateTimePickerStyleHookFix.SetColorsCalendar;
Var
LTextColor, LBackColor : TColor;
LDateTimePicker : TDateTimePicker;
LTextColor, LBackColor: TColor;
LDateTimePicker: TDateTimePicker;
begin
LDateTimePicker:=TDateTimePicker(Control);
//get the vcl styles colors
Expand Down Expand Up @@ -176,7 +176,7 @@ procedure TDateTimePickerStyleHookFix.WMPaint(var Message: TMessage);
LPaintStruct: TPaintStruct;
LRect: TRect;
LDetails: TThemedElementDetails;
sDateTime : string;
sDateTime: string;
begin
DC := Message.WParam;
LCanvas := TCanvas.Create;
Expand All @@ -203,8 +203,8 @@ procedure TDateTimePickerStyleHookFix.WMPaint(var Message: TMessage);

//only works for DateFormat = dfShort
case TDateTimePicker(Control).Kind of
dtkDate : sDateTime:=DateToStr(TDateTimePicker(Control).DateTime);
dtkTime : sDateTime:=TimeToStr(TDateTimePicker(Control).DateTime);
dtkDate: sDateTime:=DateToStr(TDateTimePicker(Control).DateTime);
dtkTime: sDateTime:=TimeToStr(TDateTimePicker(Control).DateTime);
end;

//draw the current date/time value
Expand Down
6 changes: 3 additions & 3 deletions Ext/VCLStyleUtils/Common/Vcl.Styles.DbGrid.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// The Original Code is Vcl.Styles.DbGrid.pas.
//
// The Initial Developer of the Original Code is Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2019 Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2021 Rodrigo Ruz V.
// All Rights Reserved.
//
//**************************************************************************************************
Expand Down Expand Up @@ -57,7 +57,7 @@ TDbGridHelper = class helper for TCustomDBGrid
function GetSelRow: Integer;
procedure SetSelRow(const Value: Integer);
public
property TitleOffset : Byte read GetTitleOffset;
property TitleOffset: Byte read GetTitleOffset;
property Indicators: TCustomImageList read GetIndicators;
property SelRow: Integer read GetSelRow write SetSelRow;
end;
Expand Down Expand Up @@ -95,7 +95,7 @@ procedure _WriteText(ACanvas: TCanvas; ARect: TRect; DX, DY: Integer; const ATex
if (ACanvas.CanvasOrientation = coRightToLeft) and (not ARightToLeft) then
ChangeBiDiModeAlignment(Alignment);
case Alignment of
taLeftJustify : X := ARect.Left + DX;
taLeftJustify: X := ARect.Left + DX;
taRightJustify: X := ARect.Right - ACanvas.TextWidth(AText) - 3;
else
X := ARect.Left + (ARect.Right - ARect.Left) shr 1 - (ACanvas.TextWidth(AText) shr 1);
Expand Down
Loading

0 comments on commit ca6535b

Please sign in to comment.