diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-11 00:04:12 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-11 00:07:44 +0300 |
commit | b197a47889a81b0181553a2a9c4db9683dd5d760 (patch) | |
tree | dae0ccd9926cf5bba4e83d025ed5be4634020260 /vcl/source | |
parent | 9079d599baf01cb414ed4cccb22546f1807e5637 (diff) |
Height and Width seem to be swapped here
when height takes left-right borders, and width top-bottom.
And also - Why do we calculate the borders twice - as the call
to CalcWindowSize does this again?
Change-Id: I63a66939bd526a225ccac9bdd6262feba48da5c2
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/dockwin.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 8dff109b6b50..9a523c7a1311 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -1072,10 +1072,8 @@ Size DockingWindow::GetOptimalSize() const sal_Int32 nBorderWidth = get_border_width(); - aSize.Height() += mpWindowImpl->mnLeftBorder + mpWindowImpl->mnRightBorder - + 2*nBorderWidth; - aSize.Width() += mpWindowImpl->mnTopBorder + mpWindowImpl->mnBottomBorder - + 2*nBorderWidth; + aSize.Height() += 2 * nBorderWidth; + aSize.Width() += 2 * nBorderWidth; return Window::CalcWindowSize(aSize); } diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index f844eef16d1a..5e1a372aa568 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1091,10 +1091,8 @@ Size SystemWindow::GetOptimalSize() const sal_Int32 nBorderWidth = get_border_width(); - aSize.Height() += mpWindowImpl->mnLeftBorder + mpWindowImpl->mnRightBorder - + 2*nBorderWidth; - aSize.Width() += mpWindowImpl->mnTopBorder + mpWindowImpl->mnBottomBorder - + 2*nBorderWidth; + aSize.Height() += 2 * nBorderWidth; + aSize.Width() += 2 * nBorderWidth; return Window::CalcWindowSize(aSize); } |