From 413eaa1b60796be80eb8ed43d939c848010974cd Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Thu, 10 Nov 2022 17:09:25 +0000 Subject: [PATCH] GridPrinter: Fix AutoSizing of Header/Footer Dialog. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8601 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/gridprinter/source/gridprnheaderfooterform.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/gridprinter/source/gridprnheaderfooterform.pas b/components/gridprinter/source/gridprnheaderfooterform.pas index 476663406..aacbd4de3 100644 --- a/components/gridprinter/source/gridprnheaderfooterform.pas +++ b/components/gridprinter/source/gridprnheaderfooterform.pas @@ -80,12 +80,13 @@ var begin delta := TabControl.Height - TabControl.ClientHeight; Constraints.MinHeight := delta + clbLineColor.Top + clbLineColor.Height + - clbLinecolor.BorderSpacing.Bottom + ButtonPanel1.Height + + clbLinecolor.BorderSpacing.Bottom + + ButtonPanel1.Height + ButtonPanel1.BorderSpacing.Around * 2;// + TabControl.BorderSpacing.Around * 2; Constraints.MinWidth := edTextLeft.Left + edTextLeft.Width + Bevel1.Width + edTextCenter.Width + Bevel2.Width + edTextRight.Width + edTextRight.BorderSpacing.Right + TabControl.BorderSpacing.Around * 2; - Width := 0; + Width := 0; // Enforce the constraints Height := 0; end;