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

Caolán McNamara caolanm at redhat.com
Thu Mar 23 16:07:59 UTC 2017


 extensions/source/propctrlr/browserlistbox.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 5013abeb191cdc6f8375f107a4d30abd802547d2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 23 16:06:18 2017 +0000

    Resolves: tdf#106461 use a row height of max of edit and listbox height
    
    not just take the listbox because edits can be taller and result in
    overlaps
    
    Change-Id: I6067b384484d933727220febda723bc9e8c5e90b

diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index 3bc041964e1a..0e8055b436a0 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -326,9 +326,11 @@ namespace pcr
             ,m_bUpdate(true)
             ,m_pControlContextImpl( new PropertyControlContext_Impl( *this ) )
     {
-        ScopedVclPtrInstance< ListBox > aListBox(this,WB_DROPDOWN);
-        aListBox->SetPosSizePixel(Point(0,0),Size(100,100));
-        m_nRowHeight = aListBox->GetSizePixel().Height()+2;
+        ScopedVclPtrInstance<ListBox> aListBox(this, WB_DROPDOWN);
+        ScopedVclPtrInstance<Edit> aEditBox(this);
+        m_nRowHeight = std::max(aListBox->get_preferred_size().Height(),
+                                aEditBox->get_preferred_size().Height());
+        m_nRowHeight += 2;
         SetBackground( pParent->GetBackground() );
         m_aLinesPlayground->SetBackground( GetBackground() );
 
@@ -339,7 +341,6 @@ namespace pcr
         m_aVScroll->SetScrollHdl(LINK(this, OBrowserListBox, ScrollHdl));
     }
 
-
     OBrowserListBox::~OBrowserListBox()
     {
         disposeOnce();


More information about the Libreoffice-commits mailing list