Browse Source

TLabel: use TFresnelCaption

mattias 1 year ago
parent
commit
67f4b4e3ff
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/base/fresnel.controls.pas

+ 6 - 6
src/base/fresnel.controls.pas

@@ -64,15 +64,15 @@ type
     class var FFresnelLabelTypeID: TCSSNumericalID;
     class constructor InitFresnelLabelClass;
   private
-    FCaption: String;
-    FRenderedCaption: String;
+    FCaption: TFresnelCaption;
+    FRenderedCaption: TFresnelCaption;
   protected
     FLabelStates: TFresnelLabelStates;
     FMinCaption: String; // Caption with linebreak after each word
     FMinWidth: TFresnelLength; // width of longest word of Caption
     FSize: TFresnelPoint; // width+height of Caption
     procedure ComputeMinCaption; virtual;
-    procedure SetCaption(const AValue: String); virtual;
+    procedure SetCaption(const AValue: TFresnelCaption); virtual;
     procedure SetName(const NewName: TComponentName); override;
     procedure DoRender(aRenderer: IFresnelRenderer); override;
   public
@@ -85,8 +85,8 @@ type
     procedure UpdateRenderedAttributes; override;
     class function CSSTypeID: TCSSNumericalID; override;
     class function CSSTypeName: TCSSString; override;
-    property Caption: String read FCaption write SetCaption;
-    property RenderedCaption: String read FRenderedCaption write FRenderedCaption;
+    property Caption: TFresnelCaption read FCaption write SetCaption;
+    property RenderedCaption: TFresnelCaption read FRenderedCaption write FRenderedCaption;
   end;
 
   { TLabel }
@@ -489,7 +489,7 @@ begin
   SetLength(FMinCaption,TargetP-1);
 end;
 
-procedure TCustomLabel.SetCaption(const AValue: String);
+procedure TCustomLabel.SetCaption(const AValue: TFresnelCaption);
 begin
   if FCaption=AValue then Exit;
   FCaption:=AValue;