From f69dc9f1603adbee34ffc2200dfadc30b846765e Mon Sep 17 00:00:00 2001 From: "miaoqing.wmq" Date: Fri, 20 May 2016 18:47:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B0=B4=E5=B9=B3=E5=92=8C?= =?UTF-8?q?=E5=9E=82=E7=9B=B4=E5=B8=83=E5=B1=80=E5=9C=A8=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=E5=B8=83=E5=B1=80=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DuiLib/Layout/UIHorizontalLayout.cpp | 3 ++- DuiLib/Layout/UIVerticalLayout.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DuiLib/Layout/UIHorizontalLayout.cpp b/DuiLib/Layout/UIHorizontalLayout.cpp index 7179f773..fa4b49a8 100644 --- a/DuiLib/Layout/UIHorizontalLayout.cpp +++ b/DuiLib/Layout/UIHorizontalLayout.cpp @@ -130,7 +130,8 @@ namespace DuiLib if (iControlMaxHeight <= 0) iControlMaxHeight = pControl->GetMaxHeight(); if (szControlAvailable.cx > iControlMaxWidth) szControlAvailable.cx = iControlMaxWidth; if (szControlAvailable.cy > iControlMaxHeight) szControlAvailable.cy = iControlMaxHeight; - if (iEstimate > 1) cxFixedRemaining = cxFixedRemaining - (rcPadding.left + rcPadding.right) - m_iChildPadding; + cxFixedRemaining = cxFixedRemaining - (rcPadding.left + rcPadding.right); + if (iEstimate > 1) cxFixedRemaining = cxFixedRemaining - m_iChildPadding; SIZE sz = pControl->EstimateSize(szControlAvailable); if (pControl->GetFixedWidth() == 0 || sz.cx == 0) { iAdjustable++; diff --git a/DuiLib/Layout/UIVerticalLayout.cpp b/DuiLib/Layout/UIVerticalLayout.cpp index 061562f2..7ff885f2 100644 --- a/DuiLib/Layout/UIVerticalLayout.cpp +++ b/DuiLib/Layout/UIVerticalLayout.cpp @@ -123,7 +123,8 @@ namespace DuiLib if (iControlMaxHeight <= 0) iControlMaxHeight = pControl->GetMaxHeight(); if (szControlAvailable.cx > iControlMaxWidth) szControlAvailable.cx = iControlMaxWidth; if (szControlAvailable.cy > iControlMaxHeight) szControlAvailable.cy = iControlMaxHeight; - if (iEstimate > 1) cyFixedRemaining = cyFixedRemaining - (rcPadding.top + rcPadding.bottom) - m_iChildPadding; + cyFixedRemaining = cyFixedRemaining - (rcPadding.top + rcPadding.bottom); + if (iEstimate > 1) cyFixedRemaining = cyFixedRemaining - m_iChildPadding; SIZE sz = pControl->EstimateSize(szControlAvailable); if( sz.cy == 0 ) { iAdjustable++;