diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2016-08-24 15:54:05 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-08-25 05:48:27 +0000 |
commit | 1e84b23839d96068c862e746c9162db79d2c8c62 (patch) | |
tree | 6600446090c0362d9faa7c0906b3b686de05283b /vcl/source | |
parent | 1b78ee6fc00924fd8d502dc92b82738a404cee34 (diff) |
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@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/toolbox.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 4937e5957e3b..d50b3bf61901 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; } } |