[Libreoffice-commits] core.git: vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon May 13 17:59:17 UTC 2019


 vcl/source/control/listbox.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 3841143d9abf6b1c2ccf4839e9a1168dbaaf0568
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon May 13 15:17:58 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon May 13 19:58:24 2019 +0200

    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 at collabora.co.uk>

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,


More information about the Libreoffice-commits mailing list