diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2013-05-21 13:31:56 +0000 |
---|---|---|
committer | Oliver-Rainer Wittmann <orw@apache.org> | 2013-05-21 13:31:56 +0000 |
commit | 1aead9f230e3953f6049e1700d912d6c14c62e7f (patch) | |
tree | 1f7856846f5035dd15cc9674967fbd0b3ef35a9e /sd | |
parent | ff4875ae18c417a74621559bd2d2e9ad05929a82 (diff) |
122260: Calc Navigator - assure that tool box is at least as wide as the tree list box to avoid 'bad' layout when the Navigator is resized.
Notes
Notes:
merged as: 9ffcc8516ceb5c3b9e522bae6542a9d0e606663e
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 390726ad80ae..ced4e75c6aa7 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -106,7 +106,8 @@ SdNavigatorWin::SdNavigatorWin( maToolbox.SetItemBits( TBI_DRAGTYPE, maToolbox.GetItemBits( TBI_DRAGTYPE ) | TIB_DROPDOWNONLY ); // Shape filter drop down menu. - maToolbox.SetItemBits(TBI_SHAPE_FILTER, + maToolbox.SetItemBits( + TBI_SHAPE_FILTER, maToolbox.GetItemBits(TBI_SHAPE_FILTER) | TIB_DROPDOWNONLY); // TreeListBox @@ -125,8 +126,18 @@ SdNavigatorWin::SdNavigatorWin( nListboxYPos = maTlbObjects.GetPosPixel().Y() + maTlbObjects.GetSizePixel().Height() + 4; maLbDocs.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); + // assure that tool box is at least as wide as the tree list box + { + const Size aTlbSize( maTlbObjects.GetOutputSizePixel() ); + if ( aTlbSize.Width() > aTbxSize.Width() ) + { + maToolbox.SetPosSizePixel( 0, 0, aTlbSize.Width(), 0, WINDOW_POSSIZE_WIDTH ); + aTbxSize = maToolbox.GetOutputSizePixel(); + } + } + // set min outputsize after all sizes are known - long nFullHeight = nListboxYPos + maLbDocs.GetSizePixel().Height() + 4; + const long nFullHeight = nListboxYPos + maLbDocs.GetSizePixel().Height() + 4; maSize = GetOutputSizePixel(); if( maSize.Height() < nFullHeight ) { @@ -134,7 +145,7 @@ SdNavigatorWin::SdNavigatorWin( SetOutputSizePixel( maSize ); } maMinSize = maSize; - long nMinWidth = 2*maToolbox.GetPosPixel().X() + aTbxSize.Width(); // never clip the toolbox + const long nMinWidth = 2*maToolbox.GetPosPixel().X() + aTbxSize.Width(); // never clip the toolbox if( nMinWidth > maMinSize.Width() ) maMinSize.Width() = nMinWidth; maMinSize.Height() -= 40; |