mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 08:58:23 +02:00
LCL/TPanel: New property ShowAccelChar to improve Delphi compatibility in rendering of ampersands. Issue #39973.
This commit is contained in:
parent
fbe7aa44e1
commit
eff48575cf
@ -1084,6 +1084,7 @@ type
|
||||
FAlignment : TAlignment;
|
||||
FVertAlignment: TVerticalAlignment;
|
||||
FFullRepaint: Boolean;
|
||||
FShowAccelChar: Boolean;
|
||||
FWordWrap: Boolean;
|
||||
procedure PaintBevel(var ARect: TRect; ABevel: TPanelBevel);
|
||||
procedure SetAlignment(const Value : TAlignment);
|
||||
@ -1091,6 +1092,7 @@ type
|
||||
procedure SetBevelInner(const Value: TPanelBevel);
|
||||
procedure SetBevelOuter(const Value: TPanelBevel);
|
||||
procedure SetBevelWidth(const Value: TBevelWidth);
|
||||
procedure SetShowAccelChar(const Value: Boolean);
|
||||
procedure SetVertAlignment(const Value: TVerticalAlignment);
|
||||
procedure SetWordwrap(const Value: Boolean);
|
||||
protected
|
||||
@ -1104,6 +1106,7 @@ type
|
||||
procedure Paint; override;
|
||||
procedure SetParentBackground(const AParentBackground: Boolean); override;
|
||||
procedure UpdateParentColorChange;
|
||||
property ShowAccelChar: Boolean read FShowAccelChar write SetShowAccelChar default false;
|
||||
property VerticalAlignment: TVerticalAlignment read FVertAlignment write SetVertAlignment default taVerticalCenter;
|
||||
property WordWrap: Boolean read FWordwrap write SetWordwrap default false;
|
||||
public
|
||||
@ -1159,6 +1162,7 @@ type
|
||||
property ParentFont;
|
||||
property ParentShowHint;
|
||||
property PopupMenu;
|
||||
property ShowAccelChar;
|
||||
property ShowHint;
|
||||
property TabOrder;
|
||||
property TabStop;
|
||||
|
@ -84,6 +84,15 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TCustomPanel.SetShowAccelChar(const Value: Boolean);
|
||||
begin
|
||||
if FShowAccelChar <> Value then
|
||||
begin
|
||||
FShowAccelChar := Value;
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomPanel.SetVertAlignment(const Value: TVerticalAlignment);
|
||||
begin
|
||||
if FVertAlignment <> Value then
|
||||
@ -161,6 +170,7 @@ begin
|
||||
TS.SystemFont:=Canvas.Font.IsDefault;
|
||||
TS.Wordbreak := FWordWrap;
|
||||
TS.SingleLine := not FWordwrap;
|
||||
TS.ShowPrefix := FShowAccelChar;
|
||||
if not Enabled then
|
||||
if ThemeServices.ThemesEnabled then
|
||||
Canvas.Font.Color := clGrayText
|
||||
|
Loading…
Reference in New Issue
Block a user