Kaydet (Commit) 3841143d authored tarafından Noel Grandin's avatar Noel Grandin

sizing button wrong in ListBox::Resize

Passing a right edge co-ordinate to a width param, ever since
   commit 4849fb6d
   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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 0e3c3b84
......@@ -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,
......
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