Explorar el Código

Add all changes from 5.0.1 to 5.0.3

lainz hace 7 años
padre
commit
030885057d

+ 1 - 1
bcbutton.pas

@@ -421,7 +421,7 @@ procedure Register;
 begin
 begin
   {$I images\bgracontrols_images.lrs}
   {$I images\bgracontrols_images.lrs}
   //{$I icons\bcbutton_icon.lrs}
   //{$I icons\bcbutton_icon.lrs}
-  RegisterComponents('BGRA Controls', [TBCButton]);
+  RegisterComponents('BGRA Button Controls', [TBCButton]);
   RegisterPropertyEditor(TypeInfo(integer), TBCButton,
   RegisterPropertyEditor(TypeInfo(integer), TBCButton,
     'ImageIndex', TBCButtonImageIndexPropertyEditor);
     'ImageIndex', TBCButtonImageIndexPropertyEditor);
 end;
 end;

+ 1 - 1
bcbuttonfocus.pas

@@ -426,7 +426,7 @@ end;
 procedure Register;
 procedure Register;
 begin
 begin
   //{$I icons\bcbuttonfocus_icon.lrs}
   //{$I icons\bcbuttonfocus_icon.lrs}
-  RegisterComponents('BGRA Controls', [TBCButtonFocus]);
+  RegisterComponents('BGRA Button Controls', [TBCButtonFocus]);
   {$IFDEF FPC}
   {$IFDEF FPC}
   RegisterPropertyEditor(TypeInfo(integer), TBCButtonFocus,
   RegisterPropertyEditor(TypeInfo(integer), TBCButtonFocus,
     'ImageIndex', TBCButtonImageIndexPropertyEditor);
     'ImageIndex', TBCButtonImageIndexPropertyEditor);

+ 21 - 11
bcimagebutton.pas

@@ -374,9 +374,9 @@ begin
   {$IFDEF FPC}
   {$IFDEF FPC}
   {$I icons\bcimagebutton_icon.lrs}
   {$I icons\bcimagebutton_icon.lrs}
   {$ENDIF}
   {$ENDIF}
-  RegisterComponents('BGRA Controls', [TBCImageButton]);
+  RegisterComponents('BGRA Button Controls', [TBCImageButton]);
   //{$I icons\bcxbutton_icon.lrs}
   //{$I icons\bcxbutton_icon.lrs}
-  RegisterComponents('BGRA Controls', [TBCXButton]);
+  RegisterComponents('BGRA Button Controls', [TBCXButton]);
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 
@@ -947,6 +947,9 @@ begin
   if FAnimation = AValue then
   if FAnimation = AValue then
     Exit;
     Exit;
   FAnimation := AValue;
   FAnimation := AValue;
+
+  if csDesigning in ComponentState then Exit;
+    FTimer.Enabled := FAnimation;
 end;
 end;
 
 
 procedure TBCCustomImageButton.SetFBitmapFile(AValue: string);
 procedure TBCCustomImageButton.SetFBitmapFile(AValue: string);
@@ -1117,20 +1120,23 @@ begin
     FDestRect := Rect(0, 0, Width, Height);
     FDestRect := Rect(0, 0, Width, Height);
 
 
     { Draw default style in cache bitmaps }
     { Draw default style in cache bitmaps }
-    FBGRANormal.Rectangle(0, 0, Width, Height, BGRABlack, BGRA(0, 0, 255),
+    FBGRANormal.Rectangle(0, 0, Width, Height, BGRA(173, 173, 173), BGRA(225, 225, 225),
       dmSet);
       dmSet);
-    FBGRAHover.Rectangle(0, 0, Width, Height, BGRABlack, BGRA(0, 255, 0),
+    FBGRAHover.Rectangle(0, 0, Width, Height, BGRA(0, 120, 215), BGRA(229, 241, 251),
       dmSet);
       dmSet);
-    FBGRAActive.Rectangle(0, 0, Width, Height, BGRABlack, BGRA(255, 0, 0),
+    FBGRAActive.Rectangle(0, 0, Width, Height, BGRA(0, 84, 153), BGRA(204, 228, 247),
       dmSet);
       dmSet);
-    FBGRADisabled.Rectangle(0, 0, Width, Height, BGRABlack, BGRA(100, 100, 100),
+    FBGRADisabled.Rectangle(0, 0, Width, Height, BGRA(191, 191, 191), BGRA(204, 204, 204),
       dmSet);
       dmSet);
 
 
-    { Draw Text }
-    DrawText(FBGRANormal);
-    DrawText(FBGRAHover);
-    DrawText(FBGRAActive);
-    DrawText(FBGRADisabled);
+    if TextVisible then
+    begin
+      { Draw Text }
+      DrawText(FBGRANormal);
+      DrawText(FBGRAHover);
+      DrawText(FBGRAActive);
+      DrawText(FBGRADisabled);
+    end;
   end;
   end;
 
 
   {$IFDEF INDEBUG}
   {$IFDEF INDEBUG}
@@ -1272,6 +1278,8 @@ begin
     FTimer := TTimer.Create(Self);
     FTimer := TTimer.Create(Self);
     FTimer.Interval := 15;
     FTimer.Interval := 15;
     FTimer.OnTimer := Fade;
     FTimer.OnTimer := Fade;
+    if csDesigning in ComponentState then
+      FTimer.Enabled := False;
     FAnimation := True;
     FAnimation := True;
     FTextVisible := True;
     FTextVisible := True;
 
 
@@ -1287,6 +1295,8 @@ end;
 
 
 destructor TBCCustomImageButton.Destroy;
 destructor TBCCustomImageButton.Destroy;
 begin
 begin
+  FTimer.Enabled := False;
+  FTimer.OnTimer := nil;
   FTimer.Free;
   FTimer.Free;
   if FBGRAMultiSliceScaling <> nil then
   if FBGRAMultiSliceScaling <> nil then
     FreeAndNil(FBGRAMultiSliceScaling);
     FreeAndNil(FBGRAMultiSliceScaling);

+ 1 - 1
bcmaterialdesignbutton.pas

@@ -183,7 +183,7 @@ end;
 {$IFDEF FPC}procedure Register;
 {$IFDEF FPC}procedure Register;
 begin
 begin
   //{$I icons\bcmaterialdesignbutton_icon.lrs}
   //{$I icons\bcmaterialdesignbutton_icon.lrs}
-  RegisterComponents('BGRA Controls', [TBCMaterialDesignButton]);
+  RegisterComponents('BGRA Button Controls', [TBCMaterialDesignButton]);
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 

+ 1 - 1
bcmdbutton.pas

@@ -232,7 +232,7 @@ var
 {$IFDEF FPC}
 {$IFDEF FPC}
 procedure Register;
 procedure Register;
 begin
 begin
-  RegisterComponents('BGRA Controls', [TBCMDButton]);
+  RegisterComponents('BGRA Button Controls', [TBCMDButton]);
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 

+ 1 - 1
bcmdbuttonfocus.pas

@@ -180,7 +180,7 @@ var
 {$IFDEF FPC}
 {$IFDEF FPC}
 procedure Register;
 procedure Register;
 begin
 begin
-  RegisterComponents('BGRA Controls', [TBCMDButtonFocus]);
+  RegisterComponents('BGRA Button Controls', [TBCMDButtonFocus]);
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
bcsvgbutton.pas


+ 13 - 13
bcsvgviewer.pas

@@ -212,22 +212,22 @@ end;
 
 
 function TBCSVGViewer.GetSVGRectF: TRectF;
 function TBCSVGViewer.GetSVGRectF: TRectF;
 var
 var
-  vb: TSVGViewBox;
+  vbSize: TPointF;
 
 
   procedure NoStretch(AX,AY: single);
   procedure NoStretch(AX,AY: single);
   begin
   begin
     case HorizAlign of
     case HorizAlign of
-      taCenter: result.Left := (Width-vb.size.x)/2;
-      taRightJustify: result.Left := Width-AX-vb.size.x;
+      taCenter: result.Left := (Width-vbSize.x)/2;
+      taRightJustify: result.Left := Width-AX-vbSize.x;
       else {taLeftJustify} result.Left := AX;
       else {taLeftJustify} result.Left := AX;
     end;
     end;
     case VertAlign of
     case VertAlign of
-      tlCenter: result.Top := (Height-vb.size.y)/2;
-      tlBottom: result.Top := Height-AY-vb.size.y;
+      tlCenter: result.Top := (Height-vbSize.y)/2;
+      tlBottom: result.Top := Height-AY-vbSize.y;
       else {tlTop} result.Top := AY;
       else {tlTop} result.Top := AY;
     end;
     end;
-    result.Right := result.Left+vb.size.x;
-    result.Bottom := result.Top+vb.size.y;
+    result.Right := result.Left+vbSize.x;
+    result.Bottom := result.Top+vbSize.y;
   end;
   end;
 
 
 begin
 begin
@@ -236,10 +236,10 @@ begin
 
 
   FSVG.Units.ContainerWidth := FloatWithCSSUnit(Width*FSVG.Units.DpiX/DestDPI,cuPixel);
   FSVG.Units.ContainerWidth := FloatWithCSSUnit(Width*FSVG.Units.DpiX/DestDPI,cuPixel);
   FSVG.Units.ContainerHeight := FloatWithCSSUnit(Height*FSVG.Units.DpiY/DestDPI,cuPixel);
   FSVG.Units.ContainerHeight := FloatWithCSSUnit(Height*FSVG.Units.DpiY/DestDPI,cuPixel);
-  vb := FSVG.ViewBoxInUnit[cuPixel];
-  vb.size.x := vb.size.x *(DestDPI/FSVG.Units.DpiX);
-  vb.size.y := vb.size.y *(DestDPI/FSVG.Units.DpiY);
-  if ((StretchMode = smShrink) and ((vb.size.x > Width+0.1) or (vb.size.y > Height+0.1))) or
+  vbSize := FSVG.ViewSizeInUnit[cuPixel];
+  vbSize.x *= DestDPI/FSVG.Units.DpiX;
+  vbSize.y *= DestDPI/FSVG.Units.DpiY;
+  if ((StretchMode = smShrink) and ((vbSize.x > Width+0.1) or (vbSize.y > Height+0.1))) or
      (StretchMode = smStretch) then
      (StretchMode = smStretch) then
   begin
   begin
     if Proportional then
     if Proportional then
@@ -248,12 +248,12 @@ begin
     if StretchMode = smShrink then
     if StretchMode = smShrink then
     begin
     begin
       NoStretch(0,0);
       NoStretch(0,0);
-      if vb.size.x > Width then
+      if vbSize.x > Width then
       begin
       begin
         result.Left := 0;
         result.Left := 0;
         result.Right := Width;
         result.Right := Width;
       end;
       end;
-      if vb.size.y > Height then
+      if vbSize.y > Height then
       begin
       begin
         result.Top := 0;
         result.Top := 0;
         result.Bottom := Height;
         result.Bottom := Height;

+ 76 - 76
bgracontrols.lpk

@@ -33,7 +33,7 @@
     </CompilerOptions>
     </CompilerOptions>
     <Description Value="BGRA Controls is a set of graphical UI elements that you can use with Lazarus LCL applications."/>
     <Description Value="BGRA Controls is a set of graphical UI elements that you can use with Lazarus LCL applications."/>
     <License Value="Modified LGPL"/>
     <License Value="Modified LGPL"/>
-    <Version Major="5" Release="1"/>
+    <Version Major="6"/>
     <Files Count="47">
     <Files Count="47">
       <Item1>
       <Item1>
         <Filename Value="bcbasectrls.pas"/>
         <Filename Value="bcbasectrls.pas"/>
@@ -99,169 +99,169 @@
         <UnitName Value="BCMaterialDesignButton"/>
         <UnitName Value="BCMaterialDesignButton"/>
       </Item13>
       </Item13>
       <Item14>
       <Item14>
+        <Filename Value="bcmdbutton.pas"/>
+        <HasRegisterProc Value="True"/>
+        <UnitName Value="BCMDButton"/>
+      </Item14>
+      <Item15>
+        <Filename Value="bcmdbuttonfocus.pas"/>
+        <HasRegisterProc Value="True"/>
+        <UnitName Value="BCMDButtonFocus"/>
+      </Item15>
+      <Item16>
         <Filename Value="bcnumerickeyboard.pas"/>
         <Filename Value="bcnumerickeyboard.pas"/>
         <AddToUsesPkgSection Value="False"/>
         <AddToUsesPkgSection Value="False"/>
         <UnitName Value="BCNumericKeyboard"/>
         <UnitName Value="BCNumericKeyboard"/>
-      </Item14>
-      <Item15>
+      </Item16>
+      <Item17>
         <Filename Value="bcpanel.pas"/>
         <Filename Value="bcpanel.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BCPanel"/>
         <UnitName Value="BCPanel"/>
-      </Item15>
-      <Item16>
+      </Item17>
+      <Item18>
         <Filename Value="bcradialprogressbar.pas"/>
         <Filename Value="bcradialprogressbar.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BCRadialProgressBar"/>
         <UnitName Value="BCRadialProgressBar"/>
-      </Item16>
-      <Item17>
+      </Item18>
+      <Item19>
         <Filename Value="bcrtti.pas"/>
         <Filename Value="bcrtti.pas"/>
         <UnitName Value="BCRTTI"/>
         <UnitName Value="BCRTTI"/>
-      </Item17>
-      <Item18>
+      </Item19>
+      <Item20>
         <Filename Value="bcsamples.pas"/>
         <Filename Value="bcsamples.pas"/>
         <UnitName Value="BCSamples"/>
         <UnitName Value="BCSamples"/>
-      </Item18>
-      <Item19>
+      </Item20>
+      <Item21>
         <Filename Value="bcstylesform.pas"/>
         <Filename Value="bcstylesform.pas"/>
         <UnitName Value="BCStylesForm"/>
         <UnitName Value="BCStylesForm"/>
-      </Item19>
-      <Item20>
+      </Item21>
+      <Item22>
         <Filename Value="bcsvgbutton.pas"/>
         <Filename Value="bcsvgbutton.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BCSVGButton"/>
         <UnitName Value="BCSVGButton"/>
-      </Item20>
-      <Item21>
+      </Item22>
+      <Item23>
         <Filename Value="bcsvgviewer.pas"/>
         <Filename Value="bcsvgviewer.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BCSVGViewer"/>
         <UnitName Value="BCSVGViewer"/>
-      </Item21>
-      <Item22>
+      </Item23>
+      <Item24>
         <Filename Value="bcthememanager.pas"/>
         <Filename Value="bcthememanager.pas"/>
         <AddToUsesPkgSection Value="False"/>
         <AddToUsesPkgSection Value="False"/>
         <UnitName Value="BCThemeManager"/>
         <UnitName Value="BCThemeManager"/>
-      </Item22>
-      <Item23>
+      </Item24>
+      <Item25>
         <Filename Value="bctoolbar.pas"/>
         <Filename Value="bctoolbar.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BCToolBar"/>
         <UnitName Value="BCToolBar"/>
-      </Item23>
-      <Item24>
+      </Item25>
+      <Item26>
         <Filename Value="bctools.pas"/>
         <Filename Value="bctools.pas"/>
         <AddToUsesPkgSection Value="False"/>
         <AddToUsesPkgSection Value="False"/>
         <UnitName Value="BCTools"/>
         <UnitName Value="BCTools"/>
-      </Item24>
-      <Item25>
+      </Item26>
+      <Item27>
         <Filename Value="bctrackbarupdown.pas"/>
         <Filename Value="bctrackbarupdown.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BCTrackbarUpdown"/>
         <UnitName Value="BCTrackbarUpdown"/>
-      </Item25>
-      <Item26>
+      </Item27>
+      <Item28>
         <Filename Value="bctypes.pas"/>
         <Filename Value="bctypes.pas"/>
         <AddToUsesPkgSection Value="False"/>
         <AddToUsesPkgSection Value="False"/>
         <UnitName Value="BCTypes"/>
         <UnitName Value="BCTypes"/>
-      </Item26>
-      <Item27>
+      </Item28>
+      <Item29>
         <Filename Value="bgracustomdrawn.pas"/>
         <Filename Value="bgracustomdrawn.pas"/>
         <UnitName Value="BGRACustomDrawn"/>
         <UnitName Value="BGRACustomDrawn"/>
-      </Item27>
-      <Item28>
+      </Item29>
+      <Item30>
         <Filename Value="bgraflashprogressbar.pas"/>
         <Filename Value="bgraflashprogressbar.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BGRAFlashProgressBar"/>
         <UnitName Value="BGRAFlashProgressBar"/>
-      </Item28>
-      <Item29>
+      </Item30>
+      <Item31>
         <Filename Value="bgragraphiccontrol.pas"/>
         <Filename Value="bgragraphiccontrol.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BGRAGraphicControl"/>
         <UnitName Value="BGRAGraphicControl"/>
-      </Item29>
-      <Item30>
+      </Item31>
+      <Item32>
         <Filename Value="bgraimagelist.pas"/>
         <Filename Value="bgraimagelist.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BGRAImageList"/>
         <UnitName Value="BGRAImageList"/>
-      </Item30>
-      <Item31>
+      </Item32>
+      <Item33>
         <Filename Value="bgraimagemanipulation.pas"/>
         <Filename Value="bgraimagemanipulation.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BGRAImageManipulation"/>
         <UnitName Value="BGRAImageManipulation"/>
-      </Item31>
-      <Item32>
+      </Item33>
+      <Item34>
         <Filename Value="bgraknob.pas"/>
         <Filename Value="bgraknob.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BGRAKnob"/>
         <UnitName Value="BGRAKnob"/>
-      </Item32>
-      <Item33>
+      </Item34>
+      <Item35>
         <Filename Value="bgraresizespeedbutton.pas"/>
         <Filename Value="bgraresizespeedbutton.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BGRAResizeSpeedButton"/>
         <UnitName Value="BGRAResizeSpeedButton"/>
-      </Item33>
-      <Item34>
+      </Item35>
+      <Item36>
         <Filename Value="bgrashape.pas"/>
         <Filename Value="bgrashape.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BGRAShape"/>
         <UnitName Value="BGRAShape"/>
-      </Item34>
-      <Item35>
+      </Item36>
+      <Item37>
         <Filename Value="bgraspeedbutton.pas"/>
         <Filename Value="bgraspeedbutton.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BGRASpeedButton"/>
         <UnitName Value="BGRASpeedButton"/>
-      </Item35>
-      <Item36>
+      </Item37>
+      <Item38>
         <Filename Value="bgraspriteanimation.pas"/>
         <Filename Value="bgraspriteanimation.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BGRASpriteAnimation"/>
         <UnitName Value="BGRASpriteAnimation"/>
-      </Item36>
-      <Item37>
+      </Item38>
+      <Item39>
         <Filename Value="bgravirtualscreen.pas"/>
         <Filename Value="bgravirtualscreen.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="BGRAVirtualScreen"/>
         <UnitName Value="BGRAVirtualScreen"/>
-      </Item37>
-      <Item38>
+      </Item39>
+      <Item40>
         <Filename Value="colorspeedbutton.pas"/>
         <Filename Value="colorspeedbutton.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="ColorSpeedButton"/>
         <UnitName Value="ColorSpeedButton"/>
-      </Item38>
-      <Item39>
+      </Item40>
+      <Item41>
         <Filename Value="dtanalogclock.pas"/>
         <Filename Value="dtanalogclock.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
         <UnitName Value="DTAnalogClock"/>
         <UnitName Value="DTAnalogClock"/>
-      </Item39>
-      <Item40>
-        <Filename Value="dtthemedclock.pas"/>
-        <HasRegisterProc Value="True"/>
-        <UnitName Value="dtthemedclock"/>
-      </Item40>
-      <Item41>
-        <Filename Value="materialcolors.pas"/>
-        <UnitName Value="MaterialColors"/>
       </Item41>
       </Item41>
       <Item42>
       <Item42>
-        <Filename Value="mouseandkeyinput/mouseandkeyinput.pas"/>
-        <AddToUsesPkgSection Value="False"/>
-        <UnitName Value="MouseAndKeyInput"/>
+        <Filename Value="dtanalogcommon.pas"/>
+        <UnitName Value="DTAnalogCommon"/>
       </Item42>
       </Item42>
       <Item43>
       <Item43>
-        <Filename Value="bcmdbutton.pas"/>
+        <Filename Value="dtanaloggauge.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
-        <UnitName Value="BCMDButton"/>
+        <AddToUsesPkgSection Value="False"/>
+        <UnitName Value="DTAnalogGauge"/>
       </Item43>
       </Item43>
       <Item44>
       <Item44>
-        <Filename Value="bcmdbuttonfocus.pas"/>
+        <Filename Value="dtthemedclock.pas"/>
         <HasRegisterProc Value="True"/>
         <HasRegisterProc Value="True"/>
-        <UnitName Value="BCMDButtonFocus"/>
+        <UnitName Value="dtthemedclock"/>
       </Item44>
       </Item44>
       <Item45>
       <Item45>
-        <Filename Value="dtanalogcommon.pas"/>
-        <UnitName Value="DTAnalogCommon"/>
+        <Filename Value="dtthemedgauge.pas"/>
+        <HasRegisterProc Value="True"/>
+        <UnitName Value="dtthemedgauge"/>
       </Item45>
       </Item45>
       <Item46>
       <Item46>
-        <Filename Value="dtanaloggauge.pas"/>
-        <HasRegisterProc Value="True"/>
-        <AddToUsesPkgSection Value="False"/>
-        <UnitName Value="DTAnalogGauge"/>
+        <Filename Value="materialcolors.pas"/>
+        <UnitName Value="MaterialColors"/>
       </Item46>
       </Item46>
       <Item47>
       <Item47>
-        <Filename Value="dtthemedgauge.pas"/>
-        <HasRegisterProc Value="True"/>
-        <UnitName Value="dtthemedgauge"/>
+        <Filename Value="mouseandkeyinput/mouseandkeyinput.pas"/>
+        <AddToUsesPkgSection Value="False"/>
+        <UnitName Value="MouseAndKeyInput"/>
       </Item47>
       </Item47>
     </Files>
     </Files>
     <RequiredPkgs Count="2">
     <RequiredPkgs Count="2">

+ 0 - 1
bgraflashprogressbar.pas

@@ -171,7 +171,6 @@ procedure TBGRAFlashProgressBar.Paint;
 var
 var
   content: TRect;
   content: TRect;
   xpos, y, tx, ty: integer;
   xpos, y, tx, ty: integer;
-  grayValue: integer;
   bgColor: TBGRAPixel;
   bgColor: TBGRAPixel;
 
 
   function ApplyLightness(c: TBGRAPixel; lightness: word): TBGRAPixel;
   function ApplyLightness(c: TBGRAPixel; lightness: word): TBGRAPixel;

+ 1 - 1
bgraresizespeedbutton.pas

@@ -107,7 +107,7 @@ end;
 procedure Register;
 procedure Register;
 begin
 begin
   //{$I icons\bgraresizespeedbutton_icon.lrs}
   //{$I icons\bgraresizespeedbutton_icon.lrs}
-  RegisterComponents('BGRA Controls', [TBGRAResizeSpeedButton]);
+  RegisterComponents('BGRA Button Controls', [TBGRAResizeSpeedButton]);
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 

+ 14 - 12
bgraspeedbutton.pas

@@ -66,8 +66,8 @@ type
     { Protected declarations }
     { Protected declarations }
     {$IFDEF BGRA_DRAW}
     {$IFDEF BGRA_DRAW}
     function DrawGlyph(ACanvas: TCanvas; const AClient: TRect;
     function DrawGlyph(ACanvas: TCanvas; const AClient: TRect;
-      const AOffset: TPoint; AState: TButtonState; ATransparent: boolean;
-      BiDiFlags: longint): TRect; override;
+      const AOffset: TPoint; AState: TButtonState; {%H-}ATransparent: boolean;
+      {%H-}BiDiFlags: longint): TRect; override;
     {$ENDIF}
     {$ENDIF}
   public
   public
     { Public declarations }
     { Public declarations }
@@ -87,7 +87,7 @@ implementation
 procedure Register;
 procedure Register;
 begin
 begin
   //{$I icons\bgraspeedbutton_icon.lrs}
   //{$I icons\bgraspeedbutton_icon.lrs}
-  RegisterComponents('BGRA Controls', [TBGRASpeedButton]);
+  RegisterComponents('BGRA Button Controls', [TBGRASpeedButton]);
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 
@@ -102,19 +102,21 @@ begin
   {Result := inherited DrawGlyph(ACanvas, AClient, AOffset, AState,
   {Result := inherited DrawGlyph(ACanvas, AClient, AOffset, AState,
     ATransparent, BiDiFlags); }
     ATransparent, BiDiFlags); }
 
 
-  if Glyph = nil then
-    Exit;
+  if not Assigned(Glyph) then
+    begin
+      Result := Rect(0,0,0,0);
+      Exit;
+    end;
   { It's not good solution assigning glyph on each draw call but FGlyph and SetGlyph is
   { It's not good solution assigning glyph on each draw call but FGlyph and SetGlyph is
     in private section }
     in private section }
   FBGRA.Assign(Glyph);
   FBGRA.Assign(Glyph);
 
 
-  if Assigned(Glyph) then
-  begin
-    if (AState = bsDown) or (Down = True) then
-      FBGRA.Draw(ACanvas, AOffset.x + 1, AOffset.y + 1, False)
-    else
-      FBGRA.Draw(ACanvas, AOffset.x, AOffset.y, False);
-  end;
+  if (AState = bsDown) or (Down = True) then
+    FBGRA.Draw(ACanvas, AOffset.x + 1, AOffset.y + 1, False)
+  else
+    FBGRA.Draw(ACanvas, AOffset.x, AOffset.y, False);
+
+  Result := AClient;
 end;
 end;
 
 
 constructor TBGRASpeedButton.Create(AOwner: TComponent);
 constructor TBGRASpeedButton.Create(AOwner: TComponent);

+ 1 - 0
bgraspriteanimation.pas

@@ -663,6 +663,7 @@ end;
 
 
 destructor TBGRASpriteAnimation.Destroy;
 destructor TBGRASpriteAnimation.Destroy;
 begin
 begin
+  FAnimTimer.Enabled := False;
   FAnimTimer.OnTimer := nil;
   FAnimTimer.OnTimer := nil;
   FAnimTimer.Free;
   FAnimTimer.Free;
   FSprite.Free;
   FSprite.Free;

+ 4 - 2
colorspeedbutton.pas

@@ -43,7 +43,9 @@ type
 
 
   TColorSpeedButton = class(TBGRASpeedButton)
   TColorSpeedButton = class(TBGRASpeedButton)
   private
   private
+    {$ifdef overridepaint}
     FLastDrawDetails: TThemedElementDetails;
     FLastDrawDetails: TThemedElementDetails;
+    {$endif}
     FPopupMode: boolean;
     FPopupMode: boolean;
     FPressed: boolean;
     FPressed: boolean;
     FStateActive: TColorState;
     FStateActive: TColorState;
@@ -93,7 +95,7 @@ implementation
 {$IFDEF FPC}
 {$IFDEF FPC}
 procedure Register;
 procedure Register;
 begin
 begin
-  RegisterComponents('BGRA Controls', [TColorSpeedButton]);
+  RegisterComponents('BGRA Button Controls', [TColorSpeedButton]);
 end;
 end;
 {$ENDIF}
 {$ENDIF}
 
 
@@ -528,7 +530,7 @@ begin
   FStateActive.Color := RGBToColor(204, 228, 247);
   FStateActive.Color := RGBToColor(204, 228, 247);
   FStateActive.BorderColor := RGBToColor(0, 84, 153);
   FStateActive.BorderColor := RGBToColor(0, 84, 153);
   FStateDisabled.Color := RGBToColor(204, 204, 204);
   FStateDisabled.Color := RGBToColor(204, 204, 204);
-  FStateDisabled.Color := RGBToColor(191, 191, 191);
+  FStateDisabled.BorderColor := RGBToColor(191, 191, 191);
   Font.Color := clBlack;
   Font.Color := clBlack;
   FTextAutoSize := True;
   FTextAutoSize := True;
 end;
 end;

+ 2 - 2
update_bgracontrols_force.json

@@ -6,9 +6,9 @@
   "UpdatePackageFiles" : [
   "UpdatePackageFiles" : [
     {
     {
       "ForceNotify" : true,
       "ForceNotify" : true,
-      "InternalVersion" : 16,
+      "InternalVersion" : 19,
       "Name" : "bgracontrols.lpk",
       "Name" : "bgracontrols.lpk",
-      "Version" : "5.0.1.0"
+      "Version" : "6.0.0.0"
     },
     },
     {
     {
       "ForceNotify" : false,
       "ForceNotify" : false,

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio