diff options
author | Philipp Lohmann <pl@openoffice.org> | 2002-04-24 16:22:04 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2002-04-24 16:22:04 +0000 |
commit | 4e3ea5ec3e52099fcacdd0b3a00098c56f23aee0 (patch) | |
tree | 6977b26b136fd668613437ffe526336702dcc0d8 /vcl/source/window/status.cxx | |
parent | 7a85e01c2a49725a14fd46101fdd8837dc7aa3e4 (diff) |
#97051# resize status bar if settings change
Diffstat (limited to 'vcl/source/window/status.cxx')
-rw-r--r-- | vcl/source/window/status.cxx | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index ce3028213789..1776a7170fad 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -2,9 +2,9 @@ * * $RCSfile: status.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: ssa $ $Date: 2002-04-24 12:12:05 $ + * last change: $Author: pl $ $Date: 2002-04-24 17:22:04 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -700,12 +700,7 @@ void StatusBar::Resize() if ( mbBottomBorder ) mnCalcHeight -= 2; - // Evt. neue Textposition berechnen - if ( nOldDY && (nOldDY < mnDY) ) - { - mnTextY = 0; - mnTextY += (mnCalcHeight-GetTextHeight()-mnTextY)/2; - } + mnTextY = (mnCalcHeight-GetTextHeight())/2; // Formatierung neu ausloesen mbFormat = TRUE; @@ -819,6 +814,15 @@ void StatusBar::DataChanged( const DataChangedEvent& rDCEvt ) { mbFormat = TRUE; ImplInitSettings( TRUE, TRUE, TRUE ); + ImplStatusItem* pItem = mpItemList->First(); + while ( pItem ) + { + long nWidth = GetTextWidth( pItem->maText ); + if( nWidth > pItem->mnWidth + STATUSBAR_OFFSET ) + pItem->mnWidth = nWidth + STATUSBAR_OFFSET; + pItem = mpItemList->Next(); + } + SetSizePixel( CalcWindowSizePixel() ); Invalidate(); } } |