mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 09:18:02 +02:00
Designer: Repaint after changing "BorderSpacing" in AnchorEditor or in OI. Issue #40746, by n7800 and myself.
(cherry picked from commit 1e544fb5b9
)
This commit is contained in:
parent
7182005618
commit
93d6ba907a
@ -6957,6 +6957,8 @@ begin
|
||||
if ARoot = nil then Continue;
|
||||
if (ARoot <> APersistent) and (List.IndexOf(ARoot) >= 0) then Continue;
|
||||
List.Add(ARoot);
|
||||
if ARoot is TControl then
|
||||
TControl(ARoot).Invalidate;
|
||||
// ... get the designer ...
|
||||
AForm := GetDesignerForm(ARoot);
|
||||
if Assigned(AForm) and Assigned(AForm.Designer) then
|
||||
|
@ -43,7 +43,7 @@ uses
|
||||
// IdeIntf
|
||||
IdeIntfStrConsts, IDECommands, PropEdits, IDEDialogs, IDEImagesIntf,
|
||||
// IDE
|
||||
LazarusIDEStrConsts, IDEOptionDefs, EnvironmentOpts;
|
||||
LazarusIDEStrConsts, IDEOptionDefs, EnvironmentOpts, EnvGuiOptions;
|
||||
|
||||
type
|
||||
|
||||
@ -638,6 +638,12 @@ begin
|
||||
end;
|
||||
GlobalDesignHook.Modified(Self, 'Anchors');
|
||||
GlobalDesignHook.RefreshPropertyValues;
|
||||
// redraw border spacing frame
|
||||
if EnvironmentGuiOpts.ShowBorderSpacing then
|
||||
if (GlobalDesignHook.LookupRoot is TCustomForm) or
|
||||
(GlobalDesignHook.LookupRoot is TCustomFrame)
|
||||
then
|
||||
TControl(GlobalDesignHook.LookupRoot).Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -854,6 +854,7 @@ type
|
||||
procedure SetTop(const AValue: TSpacingSize);
|
||||
protected
|
||||
procedure Change(InnerSpaceChanged: Boolean); virtual;
|
||||
function GetOwner: TPersistent; override;
|
||||
public
|
||||
constructor Create(OwnerControl: TControl; ADefault: PControlBorderSpacingDefault = nil);
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
@ -3852,8 +3853,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TControlBorderSpacing.IsEqual(Spacing: TControlBorderSpacing
|
||||
): Boolean;
|
||||
function TControlBorderSpacing.IsEqual(Spacing: TControlBorderSpacing): Boolean;
|
||||
begin
|
||||
Result:=(FAround=Spacing.Around)
|
||||
and (FBottom=Spacing.Bottom)
|
||||
@ -3893,6 +3893,11 @@ begin
|
||||
if Assigned(OnChange) then OnChange(Self);
|
||||
end;
|
||||
|
||||
function TControlBorderSpacing.GetOwner: TPersistent;
|
||||
begin
|
||||
Result := FControl;
|
||||
end;
|
||||
|
||||
function TControlBorderSpacing.GetAroundBottom: Integer;
|
||||
begin
|
||||
Result := Around+Bottom;
|
||||
|
Loading…
Reference in New Issue
Block a user