diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-25 13:33:29 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-25 13:33:29 +0000 |
commit | 7a64fa696331ff6fb9bd1b73dc05e2fe3936167d (patch) | |
tree | a603073e7b9d9b26b1f5b005da622d3f0bff60cc /vcl/source/window | |
parent | f68797f95517777b731676f1e291fb989ad52560 (diff) |
INTEGRATION: CWS vcl89 (1.28.14); FILE MERGED
2008/05/29 08:32:33 pl 1.28.14.2: RESYNC: (1.28-1.29); FILE MERGED
2008/05/28 13:20:35 pl 1.28.14.1: #i87238# play with status bar height
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/status.cxx | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 04f69d497cbe..4aaef6a707b1 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: status.cxx,v $ - * $Revision: 1.29 $ + * $Revision: 1.30 $ * * This file is part of OpenOffice.org. * @@ -630,7 +630,7 @@ void StatusBar::ImplDrawProgress( BOOL bPaint, if( bNative ) { aPos = maPrgsFrameRect.TopLeft(); - nPrgsHeight += STATUSBAR_PRGS_OFFSET; + nPrgsHeight = maPrgsFrameRect.GetHeight(); } DrawProgress( this, aPos, mnPrgsSize/2, mnPrgsSize, nPrgsHeight, nPercent1*100, nPercent2*100, mnPercentCount, maPrgsFrameRect ); @@ -679,7 +679,13 @@ void StatusBar::ImplCalcProgressRect() aNativeControlRegion, aNativeContentRegion ) ) != FALSE ) { long nProgressHeight = aNativeControlRegion.GetBoundRect().GetHeight(); - maPrgsTxtPos.Y() = mnItemY + (nProgressHeight - GetTextHeight())/2; + if( nProgressHeight > maPrgsFrameRect.GetHeight() ) + { + long nDelta = nProgressHeight - maPrgsFrameRect.GetHeight(); + maPrgsFrameRect.Top() -= (nDelta - nDelta/2); + maPrgsFrameRect.Bottom() += nDelta/2; + } + maPrgsTxtPos.Y() = maPrgsFrameRect.Top() + (nProgressHeight - GetTextHeight())/2; } } if( ! bNativeOK ) @@ -1664,6 +1670,8 @@ Size StatusBar::CalcWindowSizePixel() const } long nMinHeight = GetTextHeight(); + const long nBarTextOffset = STATUSBAR_OFFSET_TEXTY*2; + long nProgressHeight = nMinHeight + nBarTextOffset; // FIXME: IsNativeControlSupported and GetNativeControlRegion should be const ? StatusBar* pThis = const_cast<StatusBar*>( this ); if( pThis->IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) ) @@ -1675,13 +1683,14 @@ Size StatusBar::CalcWindowSizePixel() const CTRL_STATE_ENABLED, aValue, rtl::OUString(), aNativeControlRegion, aNativeContentRegion ) ) { - long nProgressHeight = aNativeControlRegion.GetBoundRect().GetHeight(); - if( nProgressHeight > nMinHeight ) - nMinHeight = nProgressHeight; + nProgressHeight = aNativeControlRegion.GetBoundRect().GetHeight(); } } - nCalcHeight = nMinHeight+(STATUSBAR_OFFSET_TEXTY*2); + nCalcHeight = nMinHeight+nBarTextOffset; + if( nCalcHeight < nProgressHeight+2 ) + nCalcHeight = nProgressHeight+2; + // add border if( IsTopBorder() ) nCalcHeight += 2; |