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-22 11:34:42 +0100 |
commit | 313503adef671090f2735364c59c6bd16d0e20b0 (patch) | |
tree | 86fd72aac66966d94a9d27481105bd31e76cfe85 | |
parent | 42f61713d1bc841d9638b14b591c7ecc73e5ef51 (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
(cherry picked from commit 9ffcc8516ceb5c3b9e522bae6542a9d0e606663e)
-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; |