diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2013-05-21 13:31:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-21 18:51:30 +0100 |
commit | 9ffcc8516ceb5c3b9e522bae6542a9d0e606663e (patch) | |
tree | 6e201de083c0cae69e2a434f7c480e6a032dab1c /sd | |
parent | 57af6389b5e6cf9656edb96e987509ce84b45721 (diff) |
Resolves: #i122260# 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.
(cherry picked from commit 1aead9f230e3953f6049e1700d912d6c14c62e7f)
Change-Id: Ie9aae42c42312777847fdb3261aa74ca7beaccbb
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 88262d7668f0..37ca47b63bc7 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -95,7 +95,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 @@ -114,8 +115,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 ) { @@ -123,7 +134,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; |