mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 11:01:20 +02:00
LCL-GTK3: My own component renders empty caption. Issue #38621, patch by Anton Kavalenka.
git-svn-id: trunk@64836 -
This commit is contained in:
parent
83820dbaf0
commit
692175a06d
@ -78,7 +78,7 @@ type
|
||||
FProps: TStringList;
|
||||
FWidgetRGBA: array [0{GTK_STATE_NORMAL}..4{GTK_STATE_INSENSITIVE}] of TDefaultRGBA;
|
||||
FCentralWidgetRGBA: array [0{GTK_STATE_NORMAL}..4{GTK_STATE_INSENSITIVE}] of TDefaultRGBA;
|
||||
|
||||
fText:string;
|
||||
function CanSendLCLMessage: Boolean;
|
||||
function GetCairoContext: Pcairo_t;
|
||||
function GetEnabled: Boolean;
|
||||
@ -618,12 +618,10 @@ type
|
||||
TGtk3Panel = class(TGtk3Bin)
|
||||
private
|
||||
FBorderStyle: TBorderStyle;
|
||||
FText: String;
|
||||
protected
|
||||
procedure SetColor(AValue: TColor); override;
|
||||
function CreateWidget(const Params: TCreateParams):PGtkWidget; override;
|
||||
procedure DoBeforeLCLPaint; override;
|
||||
function getText: String; override;
|
||||
procedure setText(const AValue: String); override;
|
||||
public
|
||||
property BorderStyle: TBorderStyle read FBorderStyle write FBorderStyle;
|
||||
@ -799,12 +797,9 @@ type
|
||||
{ TGtk3HintWindow }
|
||||
|
||||
TGtk3HintWindow = class(TGtk3Window)
|
||||
private
|
||||
FText: String;
|
||||
protected
|
||||
function getText: String; override;
|
||||
procedure setText(const AValue: String); override;
|
||||
function CreateWidget(const Params: TCreateParams):PGtkWidget; override;
|
||||
private
|
||||
protected
|
||||
function CreateWidget(const Params: TCreateParams):PGtkWidget; override;
|
||||
end;
|
||||
|
||||
{ TGtk3Dialog }
|
||||
@ -2514,11 +2509,12 @@ end;
|
||||
|
||||
function TGtk3Widget.getText: String;
|
||||
begin
|
||||
Result := '';
|
||||
Result := fText; // default text storage
|
||||
end;
|
||||
|
||||
procedure TGtk3Widget.setText(const AValue: String);
|
||||
begin
|
||||
fText:=AValue;
|
||||
// DebugLn('WARNING: ',dbgsName(LCLObject),' self=',dbgsName(Self),' does not implement setText !');
|
||||
end;
|
||||
|
||||
@ -3172,11 +3168,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TGtk3Panel.getText: String;
|
||||
begin
|
||||
Result := FText;
|
||||
end;
|
||||
|
||||
procedure TGtk3Panel.setText(const AValue: String);
|
||||
begin
|
||||
if FText = AValue then
|
||||
@ -7410,16 +7401,6 @@ end;
|
||||
|
||||
{ TGtk3HintWindow }
|
||||
|
||||
function TGtk3HintWindow.getText: String;
|
||||
begin
|
||||
Result := FText;
|
||||
end;
|
||||
|
||||
procedure TGtk3HintWindow.setText(const AValue: String);
|
||||
begin
|
||||
FText := AValue;
|
||||
end;
|
||||
|
||||
function TGtk3HintWindow.CreateWidget(const Params: TCreateParams): PGtkWidget;
|
||||
var
|
||||
AForm: THintWindow;
|
||||
|
Loading…
Reference in New Issue
Block a user