summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2017-12-06 01:20:13 +0200
committerMichael Stahl <mstahl@redhat.com>2018-01-04 20:43:13 +0100
commit4050b2c960db4f2bf17b954e65aae40a415c0761 (patch)
tree3e06f6ff5edb6c949a36e0f54ba79b523791ef07
parent4e35c16ac29468ac8467da70cbe3c3a2685165ce (diff)
tdf#114262 Respect text+image toolbar style
Regression of 67c9d054517fc3b5cbc203c330eedef4b50f0e57 ("fdo#84938: replace TIB_ constants with enum"). Change-Id: Ib90473a80fd491f4a136b4e76864c107a9240990 Reviewed-on: https://gerrit.libreoffice.org/45920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> (cherry picked from commit 291ea673180a37912697646850959b3f6553cc7a) Reviewed-on: https://gerrit.libreoffice.org/46145 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--vcl/source/window/toolbox.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index b08cf4ca5261..71703b503de0 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -149,12 +149,13 @@ int ToolBox::ImplGetDragWidth() const
ButtonType determineButtonType( ImplToolItem* pItem, ButtonType defaultType )
{
ButtonType tmpButtonType = defaultType;
- if ( pItem->mnBits & (ToolBoxItemBits::TEXT_ONLY | ToolBoxItemBits::ICON_ONLY) ) // item has custom setting
+ ToolBoxItemBits nBits = pItem->mnBits & ( ToolBoxItemBits::TEXT_ONLY | ToolBoxItemBits::ICON_ONLY );
+ if ( nBits != ToolBoxItemBits::NONE ) // item has custom setting
{
tmpButtonType = ButtonType::SYMBOLTEXT;
- if ( pItem->mnBits & ToolBoxItemBits::TEXT_ONLY )
+ if ( nBits == ToolBoxItemBits::TEXT_ONLY )
tmpButtonType = ButtonType::TEXT;
- else if ( pItem->mnBits & ToolBoxItemBits::ICON_ONLY )
+ else if ( nBits == ToolBoxItemBits::ICON_ONLY )
tmpButtonType = ButtonType::SYMBOLONLY;
}
return tmpButtonType;