From 45264d8fd882101912065b9bbb47260fa6db200c Mon Sep 17 00:00:00 2001 From: Rafael Dominguez Date: Thu, 28 Mar 2013 21:40:17 -0430 Subject: Position view below toolbox and search bar when resizing Template dialog. Change-Id: Icfafb88218ad10e8729fd966265e1ccc001041e5 --- sfx2/source/doc/templatedlg.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sfx2/source') diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index f9e1d552c668..22bc0ed1d2d1 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -364,11 +364,9 @@ void SfxTemplateManagerDlg::Resize() mpActionBar->SetPosSizePixel(aActionPos,aActionSize); mpTemplateBar->SetSizePixel(aTemplateSize); - // Set view position below toolbox Point aViewPos = maView->GetPosPixel(); aViewPos.setY(nToolbarsHeight); aViewPos.setX(0); - Size aThumbSize(aWinSize.getWidth(), aWinSize.getHeight() - aViewPos.getY()); // Set search box position and size Size aSearchSize = mpSearchEdit->CalcMinimumSize(); @@ -377,6 +375,12 @@ void SfxTemplateManagerDlg::Resize() mpSearchEdit->SetSizePixel(aSearchSize); mpSearchEdit->SetPosPixel(Point(PADDING_DLG_BORDER,aViewPos.Y())); + if (mpSearchEdit->IsVisible()) + aViewPos.setY(aViewPos.getY() + mpSearchEdit->GetSizePixel().getHeight() ); + + // Set view position below toolbox and search box + Size aThumbSize(aWinSize.getWidth(), aWinSize.getHeight() - aViewPos.getY()); + maView->SetPosSizePixel(aViewPos,aThumbSize); mpOnlineView->SetPosSizePixel(aViewPos,aThumbSize); mpSearchView->SetPosSizePixel(aViewPos,aThumbSize); -- cgit