Kaydet (Commit) c5e98e75 authored tarafından Andras Timar's avatar Andras Timar

remove pointless calculations

üst 78e8d5f0
...@@ -778,17 +778,12 @@ void BackingWindow::Resize() ...@@ -778,17 +778,12 @@ void BackingWindow::Resize()
// #i93631# squeeze controls so they fit into the box // #i93631# squeeze controls so they fit into the box
// this can be necessary due to application font height which has small deviations // this can be necessary due to application font height which has small deviations
// from the size set // from the size set
const long nWDelta = 0;
const long nW2Delta = 0;
const long nPDelta = 0;
const long nBDelta = maButtonImageSize.Height() + 10; const long nBDelta = maButtonImageSize.Height() + 10;
const long nB2Delta = 3*maButtonImageSize.Height()/2; const long nB2Delta = 3*maButtonImageSize.Height()/2;
const long nLastDelta = maButtonImageSize.Height(); const long nLastDelta = maButtonImageSize.Height();
long nDiff = 0; long nDiff = 0;
while( ( maControlRect.Top() + while( ( maControlRect.Top() -
(nWDelta - nDiff) + 3 * nDiff +
(nW2Delta- nDiff) +
(nPDelta - nDiff) +
3 * (nBDelta - nDiff) + 3 * (nBDelta - nDiff) +
(nB2Delta- nDiff) + (nB2Delta- nDiff) +
nLastDelta nLastDelta
...@@ -797,15 +792,7 @@ void BackingWindow::Resize() ...@@ -797,15 +792,7 @@ void BackingWindow::Resize()
nDiff++; nDiff++;
} }
long nYPos = maControlRect.Top(); long nYPos = maControlRect.Top() + mnBtnTop;
nYPos += nW2Delta - nDiff;
nYPos += nWDelta - nDiff;
nYPos += nPDelta - nDiff;
nYPos += nWDelta/2 - nDiff;
nYPos = maControlRect.Top() + mnBtnTop;
maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) ); maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) );
maDrawButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) ); maDrawButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) );
......
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