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

Szymon Kłos eszkadev at gmail.com
Thu Aug 25 05:48:54 UTC 2016


 vcl/source/window/toolbox.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 1e84b23839d96068c862e746c9162db79d2c8c62
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Wed Aug 24 15:54:05 2016 +0200

    BigToolBox: fixed drawing with gtk2
    
    Button's width was equal to icon width when gtk2 was used
    
    Change-Id: I34e5c5c36653365ac422667a69d89aa6a91340a1
    Reviewed-on: https://gerrit.libreoffice.org/28361
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 4937e59..d50b3bf 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3050,7 +3050,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
         if ( pItem->mnBits & ToolBoxItemBits::DROPDOWN &&
             ((pItem->mnBits & ToolBoxItemBits::DROPDOWNONLY) != ToolBoxItemBits::DROPDOWNONLY) )
         {
-            Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz );
+            Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) );
             if( aArrowRect.Top() == pItem->maRect.Top() ) // dropdown arrow on right side
                 aBtnSize.Width() -= aArrowRect.GetWidth();
             else // dropdown arrow on bottom side
@@ -3265,6 +3265,10 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
             {
                 long nArrowHeight = ( pItem->mnBits & ToolBoxItemBits::DROPDOWN )
                                         ? TB_DROPDOWNARROWWIDTH : 0;
+
+                if ( ImplGetSVData()->maNWFData.mbToolboxDropDownSeparate )
+                    nArrowHeight = 0;
+
                 nTextOffY += nBtnHeight - aTxtSize.Height() - nArrowHeight;
             }
         }


More information about the Libreoffice-commits mailing list