From 4757739e38e046a7e925e6de2fff38e41f3632e7 Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 23 Apr 2009 09:28:45 +0000 Subject: [PATCH] lcl: adjust TButtonPanel buttons width/height on text change git-svn-id: trunk@19588 - --- lcl/buttonpanel.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lcl/buttonpanel.pas b/lcl/buttonpanel.pas index 663ed23261..f966d996c4 100644 --- a/lcl/buttonpanel.pas +++ b/lcl/buttonpanel.pas @@ -263,6 +263,10 @@ begin begin if FButtons[btn] = nil then Continue; FButtons[btn].CalculatePreferredSize(BtnWidth, BtnHeight, True); + if Align in [alTop, alBottom] then + FButtons[btn].Width := BtnWidth; + if Align in [alLeft, alRight] then + FButtons[btn].Height := BtnHeight; if BtnWidth > FButtonsWidth then FButtonsWidth := BtnWidth; if BtnHeight > FButtonsHeight then