diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-13 15:17:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-13 19:58:24 +0200 |
commit | 3841143d9abf6b1c2ccf4839e9a1168dbaaf0568 (patch) | |
tree | c4f0c0cc4b9d728c2819ad55f7350f75a0621056 /vcl/source/control | |
parent | 0e3c3b842e14b9646d3697cf1266be21359e0f13 (diff) |
sizing button wrong in ListBox::Resize
Passing a right edge co-ordinate to a width param, ever since
commit 4849fb6d668f6cf8fa7e6bf33c15db4696355001
Date: Mon May 10 14:47:20 2004 +0000
INTEGRATION: CWS nwf (1.25.36); FILE MERGED
Probably only works because the button is on the right edge, and
consequently the width will be clamped to the widget area.
Change-Id: I28a88cd298bc5beb20162f457c7cc125e1d0303a
Reviewed-on: https://gerrit.libreoffice.org/72231
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/listbox.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index 050faa2d13d8..08855cef701d 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -590,14 +590,13 @@ void ListBox::Resize() if ( GetNativeControlRegion( ControlType::Listbox, ControlPart::ButtonDown, aArea, ControlState::NONE, aControlValue, aBound, aContent) ) { - long nTop = 0; // Convert back from border space to local coordinates aPoint = pBorder->ScreenToOutputPixel( OutputToScreenPixel( aPoint ) ); aContent.Move( -aPoint.X(), -aPoint.Y() ); // Use the themes drop down size for the button aOutSz.setWidth( aContent.Left() ); - mpBtn->setPosSizePixel( aContent.Left(), nTop, aContent.Right(), (nBottom-nTop) ); + mpBtn->setPosSizePixel( aContent.Left(), 0, aContent.GetWidth(), nBottom ); // Adjust the size of the edit field if ( GetNativeControlRegion( ControlType::Listbox, ControlPart::SubEdit, |