mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 06:08:12 +02:00
lcl: grouped edit: don't use spacing if buddy isn't visible.
git-svn-id: trunk@51946 -
This commit is contained in:
parent
335c6cd563
commit
7d9e0c48b3
@ -1035,8 +1035,11 @@ end;
|
||||
|
||||
procedure TCustomEditButton.CheckButtonVisible;
|
||||
begin
|
||||
If Assigned(Button) then
|
||||
if Assigned(Button) then
|
||||
begin
|
||||
Button.Visible := CalcButtonVisible;
|
||||
UpdateSpacing;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomEditButton.ButtonClick;
|
||||
|
@ -177,7 +177,6 @@ type
|
||||
procedure SetTextHint(AValue: TTranslateString);
|
||||
procedure SetTextHintFontColor(AValue: TColor);
|
||||
procedure SetTextHintFontStyle(AValue: TFontStyles);
|
||||
procedure UpdateSpacing;
|
||||
protected
|
||||
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer;
|
||||
WithThemeSpace: Boolean); override;
|
||||
@ -232,7 +231,7 @@ type
|
||||
procedure EditUtf8KeyPress(var UTF8Key: TUTF8Char); virtual;
|
||||
procedure EditStartDrag(var DragObject: TDragObject); virtual;
|
||||
|
||||
|
||||
procedure UpdateSpacing;
|
||||
procedure CheckCursor;
|
||||
procedure CMParentColorChanged(var Message: TLMessage); message CM_PARENTCOLORCHANGED;
|
||||
function EditCanModify: Boolean; virtual;
|
||||
@ -1147,6 +1146,12 @@ end;
|
||||
|
||||
procedure TCustomAbstractGroupedEdit.UpdateSpacing;
|
||||
begin
|
||||
if (FBuddy=nil) or not FBuddy.Visible then
|
||||
begin
|
||||
FEdit.BorderSpacing.Right := 0;
|
||||
FEdit.BorderSpacing.Left := 0;
|
||||
end
|
||||
else
|
||||
if (FLayout = taLeftJustify) then
|
||||
begin
|
||||
FEdit.BorderSpacing.Right := FSpacing;
|
||||
|
Loading…
Reference in New Issue
Block a user