mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-09 03:38:17 +02:00
Designer: Repaint after changing "BorderSpacing" in AnchorEditor or in OI. Issue #40746, by n7800 and myself.
This commit is contained in:
parent
311ba77757
commit
1e544fb5b9
@ -6958,6 +6958,8 @@ begin
|
|||||||
if ARoot = nil then Continue;
|
if ARoot = nil then Continue;
|
||||||
if (ARoot <> APersistent) and (List.IndexOf(ARoot) >= 0) then Continue;
|
if (ARoot <> APersistent) and (List.IndexOf(ARoot) >= 0) then Continue;
|
||||||
List.Add(ARoot);
|
List.Add(ARoot);
|
||||||
|
if ARoot is TControl then
|
||||||
|
TControl(ARoot).Invalidate;
|
||||||
// ... get the designer ...
|
// ... get the designer ...
|
||||||
AForm := GetDesignerForm(ARoot);
|
AForm := GetDesignerForm(ARoot);
|
||||||
if Assigned(AForm) and Assigned(AForm.Designer) then
|
if Assigned(AForm) and Assigned(AForm.Designer) then
|
||||||
|
@ -43,7 +43,7 @@ uses
|
|||||||
// IdeIntf
|
// IdeIntf
|
||||||
IdeIntfStrConsts, IDECommands, PropEdits, IDEDialogs, IDEImagesIntf,
|
IdeIntfStrConsts, IDECommands, PropEdits, IDEDialogs, IDEImagesIntf,
|
||||||
// IDE
|
// IDE
|
||||||
LazarusIDEStrConsts, IDEOptionDefs, EnvironmentOpts;
|
LazarusIDEStrConsts, IDEOptionDefs, EnvironmentOpts, EnvGuiOptions;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -638,6 +638,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
GlobalDesignHook.Modified(Self, 'Anchors');
|
GlobalDesignHook.Modified(Self, 'Anchors');
|
||||||
GlobalDesignHook.RefreshPropertyValues;
|
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;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -846,6 +846,7 @@ type
|
|||||||
procedure SetTop(const AValue: TSpacingSize);
|
procedure SetTop(const AValue: TSpacingSize);
|
||||||
protected
|
protected
|
||||||
procedure Change(InnerSpaceChanged: Boolean); virtual;
|
procedure Change(InnerSpaceChanged: Boolean); virtual;
|
||||||
|
function GetOwner: TPersistent; override;
|
||||||
public
|
public
|
||||||
constructor Create(OwnerControl: TControl; ADefault: PControlBorderSpacingDefault = nil);
|
constructor Create(OwnerControl: TControl; ADefault: PControlBorderSpacingDefault = nil);
|
||||||
procedure Assign(Source: TPersistent); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
@ -3844,8 +3845,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TControlBorderSpacing.IsEqual(Spacing: TControlBorderSpacing
|
function TControlBorderSpacing.IsEqual(Spacing: TControlBorderSpacing): Boolean;
|
||||||
): Boolean;
|
|
||||||
begin
|
begin
|
||||||
Result:=(FAround=Spacing.Around)
|
Result:=(FAround=Spacing.Around)
|
||||||
and (FBottom=Spacing.Bottom)
|
and (FBottom=Spacing.Bottom)
|
||||||
@ -3885,6 +3885,11 @@ begin
|
|||||||
if Assigned(OnChange) then OnChange(Self);
|
if Assigned(OnChange) then OnChange(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TControlBorderSpacing.GetOwner: TPersistent;
|
||||||
|
begin
|
||||||
|
Result := FControl;
|
||||||
|
end;
|
||||||
|
|
||||||
function TControlBorderSpacing.GetAroundBottom: Integer;
|
function TControlBorderSpacing.GetAroundBottom: Integer;
|
||||||
begin
|
begin
|
||||||
Result := Around+Bottom;
|
Result := Around+Bottom;
|
||||||
|
Loading…
Reference in New Issue
Block a user