SpartaDockedFormEditor: Scale resizer automatically per LCL.

git-svn-id: trunk@55348 -
This commit is contained in:
michl 2017-06-14 08:27:02 +00:00
parent 3776ce9e17
commit 18d999f465

View File

@ -34,6 +34,9 @@ type
var ScrollPos: Integer); var ScrollPos: Integer);
procedure sbHorizontalScroll(Sender: TObject; ScrollCode: TScrollCode; procedure sbHorizontalScroll(Sender: TObject; ScrollCode: TScrollCode;
var ScrollPos: Integer); var ScrollPos: Integer);
public const
SIZER_RECT_SIZE = 8;
SIZER_LINE_WIDTH = 8;
private private
FVerticalScrollPos: Integer; FVerticalScrollPos: Integer;
FHorizontalScrollPos: Integer; FHorizontalScrollPos: Integer;
@ -374,8 +377,8 @@ begin
Name := 'Node' + IntToStr(Node); Name := 'Node' + IntToStr(Node);
Caption:=''; Caption:='';
Width := SizerRectSize; Width := SIZER_RECT_SIZE; // scaled dynamically by LCL
Height := SizerRectSize; Height := SIZER_RECT_SIZE; // scaled dynamically by LCL
Parent := Self; Parent := Self;
Visible := True; Visible := True;
FNodes.Add(Panel); FNodes.Add(Panel);
@ -890,8 +893,10 @@ constructor TBasicResizeFrame.Create(TheOwner: TComponent);
begin begin
inherited Create(TheOwner); inherited Create(TheOwner);
FSizerRectSize := ScaleX(8, 96); // Michl: Don't change DesignTimePPI of BasicResizeFrame (sparta_basicresizeframe.lfm).
FSizerLineWidth := ScaleX(8, 96); // There always has to be the default (none entry = 96 PPI) value!
FSizerRectSize := ScaleX(SIZER_RECT_SIZE, 96);
FSizerLineWidth := ScaleX(SIZER_LINE_WIDTH, 96);
FFakeFocusControl := TEdit.Create(Self); FFakeFocusControl := TEdit.Create(Self);
FFakeFocusControl.Parent := Self; FFakeFocusControl.Parent := Self;