Kaydet (Commit) 6f0d3a51 authored tarafından Rafael Dominguez's avatar Rafael Dominguez

Position correctly widgets in Template Manager.

Change-Id: I2bb16913f20fcc093acaec9de8b07d27a692056b
üst 0e173abe
......@@ -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;
......
......@@ -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);
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment