Ver Fonte

adding default values to reduce LFM size

Johann há 6 anos atrás
pai
commit
4d60c2a3bc
2 ficheiros alterados com 33 adições e 33 exclusões
  1. 1 1
      bccombobox.pas
  2. 32 32
      bctypes.pas

+ 1 - 1
bccombobox.pas

@@ -86,7 +86,7 @@ type
     property ItemHeight: integer read FItemHeight write FItemHeight default 0;
     property ArrowSize: integer read GetArrowSize write SetArrowSize;
     property ArrowWidth: integer read GetArrowWidth write SetArrowWidth;
-    property ArrowFlip: boolean read GetArrowFlip write SetArrowFlip;
+    property ArrowFlip: boolean read GetArrowFlip write SetArrowFlip default false;
     property DropDownBorderColor: TColor read FDropDownBorderColor write FDropDownBorderColor default clWindowText;
     property DropDownBorderSize: integer read FDropDownBorderSize write FDropDownBorderSize default 1;
     property DropDownColor: TColor read GetDropDownColor write SetDropDownColor default clWindow;

+ 32 - 32
bctypes.pas

@@ -171,17 +171,17 @@ type
     procedure Assign(Source: TPersistent); override;
   published
     property StartColor: TColor read FStartColor write SetStartColor;
-    property StartColorOpacity: byte read FStartColorOpacity write SetStartColorOpacity;
-    property DrawMode: TDrawMode read FDrawMode write SetDrawMode;
+    property StartColorOpacity: byte read FStartColorOpacity write SetStartColorOpacity default 255;
+    property DrawMode: TDrawMode read FDrawMode write SetDrawMode default dmSet;
     property EndColor: TColor read FEndColor write SetEndColor;
-    property EndColorOpacity: byte read FEndColorOpacity write SetEndColorOpacity;
-    property ColorCorrection: boolean read FColorCorrection write SetColorCorrection;
-    property GradientType: TGradientType read FGradientType write SetGradientType;
-    property Point1XPercent: single read FPoint1XPercent write SetPoint1XPercent;
-    property Point1YPercent: single read FPoint1YPercent write SetPoint1YPercent;
-    property Point2XPercent: single read FPoint2XPercent write SetPoint2XPercent;
-    property Point2YPercent: single read FPoint2YPercent write SetPoint2YPercent;
-    property Sinus: boolean read FSinus write SetSinus;
+    property EndColorOpacity: byte read FEndColorOpacity write SetEndColorOpacity default 255;
+    property ColorCorrection: boolean read FColorCorrection write SetColorCorrection default true;
+    property GradientType: TGradientType read FGradientType write SetGradientType default gtLinear;
+    property Point1XPercent: single read FPoint1XPercent write SetPoint1XPercent default 0;
+    property Point1YPercent: single read FPoint1YPercent write SetPoint1YPercent default 0;
+    property Point2XPercent: single read FPoint2XPercent write SetPoint2XPercent default 0;
+    property Point2YPercent: single read FPoint2YPercent write SetPoint2YPercent default 100;
+    property Sinus: boolean read FSinus write SetSinus default false;
   end;
 
   { TBCFont }
@@ -224,21 +224,21 @@ type
     procedure Assign(Source: TPersistent); override;
   published
     property Color: TColor read FColor write SetColor;
-    property EndEllipsis: boolean read FEndEllipsis write SetEndEllipsis;
+    property EndEllipsis: boolean read FEndEllipsis write SetEndEllipsis default false;
     property FontQuality: TBGRAFontQuality read FFontQuality write SetFontQuality;
-    property Height: integer read FHeight write SetHeight;
+    property Height: integer read FHeight write SetHeight default 0;
     property Name: string read FName write SetName stored IsNamStored;
-    property SingleLine: boolean read FSingleLine write SetSingleLine;
-    property Shadow: boolean read FShadow write SetShadow;
-    property ShadowColor: TColor read FShadowColor write SetShadowColor;
+    property SingleLine: boolean read FSingleLine write SetSingleLine default true;
+    property Shadow: boolean read FShadow write SetShadow default false;
+    property ShadowColor: TColor read FShadowColor write SetShadowColor default clBlack;
     property ShadowColorOpacity: byte read FShadowColorOpacity
-      write SetShadowColorOpacity;
-    property ShadowRadius: byte read FShadowRadius write SetShadowRadius;
-    property ShadowOffsetX: shortint read FShadowOffsetX write SetShadowOffsetX;
-    property ShadowOffsetY: shortint read FShadowOffsetY write SetShadowOffsetY;
+      write SetShadowColorOpacity default 255;
+    property ShadowRadius: byte read FShadowRadius write SetShadowRadius default 5;
+    property ShadowOffsetX: shortint read FShadowOffsetX write SetShadowOffsetX default 5;
+    property ShadowOffsetY: shortint read FShadowOffsetY write SetShadowOffsetY default 5;
     property Style: TFontStyles read FStyle write SetStyle;
-    property TextAlignment: TBCAlignment read FTextAlignment write SetTextAlignment;
-    property WordBreak: boolean read FWordBreak write SetWordBreak;
+    property TextAlignment: TBCAlignment read FTextAlignment write SetTextAlignment default bcaCenter;
+    property WordBreak: boolean read FWordBreak write SetWordBreak default false;
   end;
 
   { TBCBackground }
@@ -264,12 +264,12 @@ type
 
     procedure Assign(Source: TPersistent); override;
   published
-    property Color: TColor read FColor write SetColor;
-    property ColorOpacity: byte read FColorOpacity write SetColorOpacity;
+    property Color: TColor read FColor write SetColor default clBlack;
+    property ColorOpacity: byte read FColorOpacity write SetColorOpacity default 255;
     property Gradient1: TBCGradient read FGradient1 write SetGradient1;
     property Gradient2: TBCGradient read FGradient2 write SetGradient2;
     property Gradient1EndPercent: single read FGradient1EndPercent
-      write SetGradient1EndPercent;
+      write SetGradient1EndPercent default 35;
     property Style: TBCBackgroundStyle read FStyle write SetStyle;
   end;
 
@@ -295,13 +295,13 @@ type
     constructor Create(AControl: TControl); override;
     procedure Assign(Source: TPersistent); override;
   published
-    property Color: TColor read FColor write SetColor;
-    property ColorOpacity: byte read FColorOpacity write SetColorOpacity;
-    property LightColor: TColor read FLightColor write SetLightColor;
-    property LightOpacity: byte read FLightOpacity write SetLightOpacity;
-    property LightWidth: integer read FLightWidth write SetLightWidth;
-    property Style: TBCBorderStyle read FStyle write SetStyle;
-    property Width: integer read FWidth write SetWidth;
+    property Color: TColor read FColor write SetColor default clBlack;
+    property ColorOpacity: byte read FColorOpacity write SetColorOpacity default 255;
+    property LightColor: TColor read FLightColor write SetLightColor default clWhite;
+    property LightOpacity: byte read FLightOpacity write SetLightOpacity default 255;
+    property LightWidth: integer read FLightWidth write SetLightWidth default 0;
+    property Style: TBCBorderStyle read FStyle write SetStyle default bboSolid;
+    property Width: integer read FWidth write SetWidth default 1;
   end;
 
   { TBCRounding }
@@ -321,7 +321,7 @@ type
     property RoundX: byte read FRoundX write SetRoundX;
     property RoundY: byte read FRoundY write SetRoundY;
     property RoundOptions: TRoundRectangleOptions
-      read FRoundOptions write SetRoundOptions;
+      read FRoundOptions write SetRoundOptions default [];
   end;
 
   { TBCPixel }