diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2013-03-27 23:50:56 -0430 |
---|---|---|
committer | Rafael Dominguez <venccsralph@gmail.com> | 2013-03-28 00:21:16 -0430 |
commit | 6f0d3a51968051d4b6a390054f2e6a23e511b1a7 (patch) | |
tree | 4e3a995a1bce0256e00e3c0b513dc0263484fccf /sfx2 | |
parent | 0e173abeaef967e8b8dfee53dceaae343af6e215 (diff) |
Position correctly widgets in Template Manager.
Change-Id: I2bb16913f20fcc093acaec9de8b07d27a692056b
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/thumbnailview.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 20 |
3 files changed, 8 insertions, 20 deletions
diff --git a/sfx2/inc/sfx2/thumbnailview.hxx b/sfx2/inc/sfx2/thumbnailview.hxx index 467ac743f547..5287605b7f4c 100644 --- a/sfx2/inc/sfx2/thumbnailview.hxx +++ b/sfx2/inc/sfx2/thumbnailview.hxx @@ -309,7 +309,6 @@ protected: long mnDisplayHeight; // Height of the data display box (name, etc) long mnVisLines; long mnLines; - sal_uInt16 mnScrBarOffset; sal_uInt16 mnHighItemId; sal_uInt16 mnCols; sal_uInt16 mnFirstLine; diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 605ee50a084b..488a50d6d824 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -91,7 +91,6 @@ void ThumbnailView::ImplInit() mnVisLines = 0; mnLines = 0; mnFirstLine = 0; - mnScrBarOffset = 1; mnHighItemId = 0; mnCols = 0; mnSpacing = 0; @@ -243,7 +242,7 @@ void ThumbnailView::CalculateItemPositions () // calculate ScrollBar width long nScrBarWidth = 0; if ( mpScrBar ) - nScrBarWidth = mpScrBar->GetSizePixel().Width()+mnScrBarOffset; + nScrBarWidth = mpScrBar->GetSizePixel().Width(); // calculate maximum number of visible columns mnCols = (sal_uInt16)((aWinSize.Width()-nScrBarWidth) / (mnItemWidth)); @@ -383,8 +382,8 @@ void ThumbnailView::CalculateItemPositions () mbScroll = mnLines > mnVisLines; - Point aPos( aWinSize.Width() - nScrBarWidth - mnScrBarOffset, mnHeaderHeight ); - Size aSize( nScrBarWidth - mnScrBarOffset, aWinSize.Height() - mnHeaderHeight ); + Point aPos( aWinSize.Width() - nScrBarWidth, mnHeaderHeight ); + Size aSize( nScrBarWidth, aWinSize.Height() - mnHeaderHeight ); mpScrBar->SetPosSizePixel( aPos, aSize ); mpScrBar->SetRangeMax( (nCurCount+mnCols-1)/mnCols); diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 2ee3e10021ca..8ce5420d1b9f 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -342,13 +342,9 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg,ActivatePageHdl) void SfxTemplateManagerDlg::Resize() { - Size aWinSize = GetSizePixel(); - // Fit the tab page control and the toolbars - Size aTabSize = maTabControl.GetSizePixel(); - aTabSize.setWidth(aWinSize.getWidth()); - maTabControl.SetSizePixel(aTabSize); - maTabControl.SetTabPageSizePixel(aWinSize); + maTabControl.SetSizePixel(GetSizePixel()); + const Size aWinSize = maTabControl.GetTabPageSizePixel(); // Calculate toolboxes size and positions Size aViewSize = mpViewBar->CalcMinimumWindowSizePixel(); @@ -372,11 +368,7 @@ void SfxTemplateManagerDlg::Resize() Point aViewPos = maView->GetPosPixel(); aViewPos.setY(nToolbarsHeight); aViewPos.setX(0); - Size aThumbSize(aWinSize.getWidth(), maTabControl.GetTabPageSizePixel().getHeight() - aViewPos.getY()); - maView->SetPosSizePixel(aViewPos, aThumbSize); - - if (aWinSize.getHeight() < aViewPos.getY() + aThumbSize.getHeight() + PADDING_DLG_BORDER) - aWinSize.setHeight(aViewPos.getY() + aThumbSize.getHeight() + PADDING_DLG_BORDER); + Size aThumbSize(aWinSize.getWidth(), aWinSize.getHeight() - aViewPos.getY()); // Set search box position and size Size aSearchSize = mpSearchEdit->CalcMinimumSize(); @@ -385,11 +377,9 @@ void SfxTemplateManagerDlg::Resize() mpSearchEdit->SetSizePixel(aSearchSize); mpSearchEdit->SetPosPixel(Point(PADDING_DLG_BORDER,aViewPos.Y())); - maView->SetSizePixel(aThumbSize); + maView->SetPosSizePixel(aViewPos,aThumbSize); mpOnlineView->SetPosSizePixel(aViewPos,aThumbSize); - mpSearchView->SetSizePixel(aThumbSize); - - mpCurView->Resize(); + mpSearchView->SetPosSizePixel(aViewPos,aThumbSize); ModelessDialog::Resize(); } |