From 769fe27b8fb58a18290c688b3709b53cfc4d77ee Mon Sep 17 00:00:00 2001 From: ondrej Date: Wed, 25 Apr 2018 11:35:17 +0000 Subject: [PATCH] LCL: remove compatibility todos. Issue #33645 git-svn-id: trunk@57710 - --- lcl/buttons.pp | 6 +++--- lcl/include/buttonglyph.inc | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lcl/buttons.pp b/lcl/buttons.pp index 65f3e1802d..f2ba340df1 100644 --- a/lcl/buttons.pp +++ b/lcl/buttons.pp @@ -109,14 +109,14 @@ type public constructor Create; destructor Destroy; override; - // procedure GetImageIndexAndEffect(State: TButtonState; out AIndex: Integer; out AEffect: TGraphicsDrawEffect); To-Do: enable for backwards compatibility + procedure GetImageIndexAndEffect(State: TButtonState; out AIndex: Integer; out AEffect: TGraphicsDrawEffect); procedure GetImageIndexAndEffect(State: TButtonState; APPI: Integer; const ACanvasScaleFactor: Double; out AImageResolution: TScaledImageListResolution; out AIndex: Integer; out AEffect: TGraphicsDrawEffect); - {function Draw(Canvas: TCanvas; const Client: TRect; const Offset: TPoint; + function Draw(Canvas: TCanvas; const Client: TRect; const Offset: TPoint; State: TButtonState; Transparent: Boolean; - BiDiFlags: Longint): TRect; To-Do: enable for backwards compatibility } + BiDiFlags: Longint): TRect; function Draw(Canvas: TCanvas; const Client: TRect; const Offset: TPoint; State: TButtonState; Transparent: Boolean; BiDiFlags, PPI: Longint; const ScaleFactor: Double): TRect; diff --git a/lcl/include/buttonglyph.inc b/lcl/include/buttonglyph.inc index 37369141d8..3438853de2 100644 --- a/lcl/include/buttonglyph.inc +++ b/lcl/include/buttonglyph.inc @@ -144,6 +144,14 @@ begin end; end; +procedure TButtonGlyph.GetImageIndexAndEffect(State: TButtonState; out + AIndex: Integer; out AEffect: TGraphicsDrawEffect); +var + x: TScaledImageListResolution; +begin + GetImageIndexAndEffect(State, 96, 1, x, AIndex, AEffect); +end; + function TButtonGlyph.GetNumGlyphs: TNumGlyphs; begin if Assigned(FExternalImages) then @@ -285,6 +293,13 @@ begin // ToDo: VCL returns the text rectangle end; +function TButtonGlyph.Draw(Canvas: TCanvas; const Client: TRect; + const Offset: TPoint; State: TButtonState; Transparent: Boolean; + BiDiFlags: Longint): TRect; +begin + Result := Draw(Canvas, Client, Offset, State, Transparent, BiDiFlags, 96, 1); +end; + procedure TButtonGlyph.Refresh; begin GlyphChanged(FOriginal);