2
0
Johann 6 жил өмнө
parent
commit
785a6e716b

+ 2 - 2
bcgradientbutton.pas

@@ -28,7 +28,7 @@ type
     Fdraw: boolean;
     Fdraw: boolean;
     Fupdating: boolean;
     Fupdating: boolean;
     Fdown: boolean;
     Fdown: boolean;
-    procedure ColorInvalidate(ASender: TObject; AData: PtrInt);
+    procedure ColorInvalidate({%H-}ASender: TObject; {%H-}AData: PtrInt);
     procedure SetBorderColor(AValue: TBCPixel);
     procedure SetBorderColor(AValue: TBCPixel);
     procedure SetBorderSize(AValue: integer);
     procedure SetBorderSize(AValue: integer);
     procedure SetColor1(AValue: TBCPixel);
     procedure SetColor1(AValue: TBCPixel);
@@ -38,7 +38,6 @@ type
     procedure SetLockVertical(AValue: boolean);
     procedure SetLockVertical(AValue: boolean);
   protected
   protected
     procedure Paint; override;
     procedure Paint; override;
-    procedure Invalidate; override;
     procedure MouseMove(Shift: TShiftState; X, Y: integer); override;
     procedure MouseMove(Shift: TShiftState; X, Y: integer); override;
     procedure MouseLeave; override;
     procedure MouseLeave; override;
     procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: integer); override;
     procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: integer); override;
@@ -46,6 +45,7 @@ type
   public
   public
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
+    procedure Invalidate; override;
     procedure BeginUpdate;
     procedure BeginUpdate;
     procedure EndUpdate;
     procedure EndUpdate;
   published
   published

+ 0 - 7
bcmaterialdesignbutton.pas

@@ -144,9 +144,6 @@ function DrawTextShadow(AWidth, AHeight: integer; AText: string;
   AFontQuality: TBGRAFontQuality = fqFineAntialiasing): TBGRACustomBitmap;
   AFontQuality: TBGRAFontQuality = fqFineAntialiasing): TBGRACustomBitmap;
 var
 var
   bmpOut, bmpSdw: TBGRABitmap;
   bmpOut, bmpSdw: TBGRABitmap;
-  OutTxtSize: TSize;
-  OutX, OutY: integer;
-  style: TTextStyle;
 begin
 begin
   bmpOut := TBGRABitmap.Create(AWidth, AHeight);
   bmpOut := TBGRABitmap.Create(AWidth, AHeight);
   bmpOut.FontAntialias := True;
   bmpOut.FontAntialias := True;
@@ -155,10 +152,6 @@ begin
   bmpOut.FontName := AFontName;
   bmpOut.FontName := AFontName;
   bmpOut.FontQuality := AFontQuality;
   bmpOut.FontQuality := AFontQuality;
 
 
-  OutTxtSize := bmpOut.TextSize(AText);
-  OutX := Round(AWidth / 2) - Round(OutTxtSize.cx / 2);
-  OutY := Round(AHeight / 2) - Round(OutTxtSize.cy / 2);
-
   if AShowShadow then
   if AShowShadow then
   begin
   begin
     bmpSdw := TBGRABitmap.Create(AWidth, AHeight);
     bmpSdw := TBGRABitmap.Create(AWidth, AHeight);

+ 1 - 0
bgraimagemanipulation.pas

@@ -2595,6 +2595,7 @@ begin
       fEndPoint := Point(X - WorkRect.Left, Y - WorkRect.Top);
       fEndPoint := Point(X - WorkRect.Left, Y - WorkRect.Top);
 
 
       // Verifies that is positioned on an anchor
       // Verifies that is positioned on an anchor
+      ACursor := crDefault;
       overCropArea :=Self.isOverAnchor(fEndPoint, fAnchorSelected, ACursor);
       overCropArea :=Self.isOverAnchor(fEndPoint, fAnchorSelected, ACursor);
       Cursor :=ACursor;
       Cursor :=ACursor;
     end;
     end;

+ 2 - 1
colorspeedbutton.pas

@@ -16,7 +16,8 @@ interface
 uses
 uses
   Classes, SysUtils, Types, {$IFDEF FPC}LCLType, LCLProc, LResources,{$ENDIF}
   Classes, SysUtils, Types, {$IFDEF FPC}LCLType, LCLProc, LResources,{$ENDIF}
   {$IFNDEF FPC}BGRAGraphics, GraphType, FPImage, {$ENDIF}
   {$IFNDEF FPC}BGRAGraphics, GraphType, FPImage, {$ENDIF}
-  Forms, Controls, Graphics, Dialogs, Buttons, BGRASpeedButton, Themes, Math;
+  Forms, Controls, Graphics, Dialogs, Buttons, BGRASpeedButton, Themes
+  {$ifdef overridepaint}, Math{$ENDIF};
 
 
 type
 type