Browse Source

avoid warnings

Unknown 6 years ago
parent
commit
0eb363c7a8
3 changed files with 9 additions and 7 deletions
  1. 3 2
      bgracolortheme.pas
  2. 3 3
      bgraimagetheme.pas
  3. 3 2
      bgratheme.pas

+ 3 - 2
bgracolortheme.pas

@@ -33,7 +33,7 @@ type
     procedure DrawButton(Caption: string; State: TBGRAThemeButtonState;
       Focused: boolean; ARect: TRect; DestCanvas: TCanvas); override;
     procedure DrawRadioButton(Caption: string; State: TBGRAThemeButtonState;
-      Focused: boolean; Checked: boolean; ARect: TRect; DestCanvas: TCanvas); override;
+      {%H-}Focused: boolean; Checked: boolean; ARect: TRect; DestCanvas: TCanvas); override;
   published
     property ColorNormal: TColor read FColorNormal write SetFColorNormal;
     property ColorHover: TColor read FColorHover write SetFColorHover;
@@ -141,7 +141,6 @@ var
 begin
   DestCanvas.Font.Color := ColorText;
   case State of
-    btbsNormal: Color := ColorNormal;
     btbsHover: Color := ColorHover;
     btbsActive: Color := ColorActive;
     btbsDisabled:
@@ -149,6 +148,8 @@ begin
       DestCanvas.Font.Color := ColorDisabled;
       Color := ColorDisabled;
     end;
+  else {btbsNormal}
+    Color := ColorNormal;
   end;
 
   Bitmap := TBGRABitmap.Create(ARect.Height, ARect.Height);

+ 3 - 3
bgraimagetheme.pas

@@ -16,7 +16,6 @@ type
   private
     FBackgroundColor: TColor;
     FSliceScalingButton: TBGRAMultiSliceScaling;
-    FImageButtonResource: string;
     procedure SetFBackgroundColor(AValue: TColor);
   protected
 
@@ -25,7 +24,7 @@ type
     destructor Destroy; override;
     procedure LoadResources(AFileName: string);
     procedure DrawButton(Caption: string; State: TBGRAThemeButtonState;
-      Focused: boolean; ARect: TRect; DestCanvas: TCanvas); override;
+      {%H-}Focused: boolean; ARect: TRect; DestCanvas: TCanvas); override;
   published
     property BackgroundColor: TColor read FBackgroundColor
       write SetFBackgroundColor default clForm;
@@ -75,10 +74,11 @@ var
   bmp: TBGRABitmap;
 begin
   case State of
-    btbsNormal: ImageIndex := 0;
     btbsHover: ImageIndex := 1;
     btbsActive: ImageIndex := 2;
     btbsDisabled: ImageIndex := 3;
+  else {btbsNormal}
+    ImageIndex := 0;
   end;
 
   bmp := TBGRABitmap.Create(ARect.Width, ARect.Height, BackgroundColor);

+ 3 - 2
bgratheme.pas

@@ -22,7 +22,7 @@ type
     procedure DrawButton(Caption: string; State: TBGRAThemeButtonState;
       Focused: boolean; ARect: TRect; DestCanvas: TCanvas); virtual;
     procedure DrawRadioButton(Caption: string; State: TBGRAThemeButtonState;
-      Focused: boolean; Checked: boolean; ARect: TRect; DestCanvas: TCanvas); virtual;
+      {%H-}Focused: boolean; Checked: boolean; ARect: TRect; DestCanvas: TCanvas); virtual;
   published
 
   end;
@@ -84,7 +84,6 @@ var
 begin
   DestCanvas.Font.Color := clBlack;
   case State of
-    btbsNormal: Color := BGRABlack;
     btbsHover: Color := BGRA(0, 120, 215);
     btbsActive: Color := BGRA(0, 84, 153);
     btbsDisabled:
@@ -92,6 +91,8 @@ begin
       DestCanvas.Font.Color := clGray;
       Color := BGRA(204, 204, 204);
     end;
+  else {btbsNormal}
+    Color := BGRABlack;
   end;
 
   Bitmap := TBGRABitmap.Create(ARect.Height, ARect.Height);