summaryrefslogtreecommitdiff
path: root/vcl/source/window/toolbox.cxx
diff options
context:
space:
mode:
authorThorsten Wagner <thorsten.wagner.4@gmail.com>2020-06-16 00:28:41 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2020-06-17 12:57:50 +0200
commitf24e64e8b55b695565109a6742598bcc90e4d9d0 (patch)
treefbedebe70a6958d473e46b1f0034631b3837fc93 /vcl/source/window/toolbox.cxx
parent60ea3aeba38912510506ebb0ee3ca5431ed35d28 (diff)
tdf#133692: Spacing within Calc formulabar reworked
Change-Id: I4f590589fdc390bfa11f7db86e65ccab3dd084fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96403 Tested-by: Jenkins Tested-by: Andreas Kainz <kainz.a@gmail.com> Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'vcl/source/window/toolbox.cxx')
-rw-r--r--vcl/source/window/toolbox.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 182c085a152e..8ddb536f7bb4 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -189,10 +189,10 @@ void ToolBox::ImplCalcBorder( WindowAlign eAlign, long& rLeft, long& rTop,
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
// reserve DragArea only for dockable toolbars
- int dragwidth = ( pWrapper && !pWrapper->IsLocked() ) ? ImplGetDragWidth() : 0;
+ int dragwidth = ( pWrapper && !pWrapper->IsLocked() ) ? ImplGetDragWidth() : 0;
- // no shadow border for dockable toolbars
- int borderwidth = pWrapper ? 0: 2;
+ // no shadow border for dockable toolbars and toolbars with WB_NOSHADOW bit set, e.g. Calc's formulabar
+ int borderwidth = ( pWrapper || mnWinStyle & WB_NOSHADOW ) ? 0 : 2;
if ( eAlign == WindowAlign::Top )
{
@@ -551,8 +551,10 @@ void ToolBox::ImplDrawBorder(vcl::RenderContext& rRenderContext)
ImplDockingWindowWrapper* pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper(this);
- // draw borders for ordinary toolbars only (not dockable)
- if( pWrapper )
+ // draw borders for ordinary toolbars only (not dockable), do not draw borders for toolbars with WB_NOSHADOW bit set,
+ // e.g. Calc's formulabar
+
+ if( pWrapper || mnWinStyle & WB_NOSHADOW )
return;
if (meAlign == WindowAlign::Bottom)