diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-13 15:17:58 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-11-21 17:09:35 +0100 |
commit | b77396a256bf8f4cc01bc5f286c06283da2b2daf (patch) | |
tree | aaf3cc100d9f0f2a72d7f42176ece33d72f4d330 /vcl | |
parent | f094876297f1db4283b02d65158973d07c3af205 (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>
(cherry picked from commit 3841143d9abf6b1c2ccf4839e9a1168dbaaf0568)
Reviewed-on: https://gerrit.libreoffice.org/83400
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-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 1cc98f12a97c..0c780d1199b3 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -592,14 +592,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, |