summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2017-12-06 01:20:13 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-12-18 14:05:24 +0100
commite067187427cf5f53ee1c2176f1042b4fedb67783 (patch)
tree20ac58fb01f1029c1784f5c1a3f51cbb8d7f139d
parentb8ba995f079add002ab9606168d31d5386993160 (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/46144 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
-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 c7b98962689b..0eb843cf167c 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -148,12 +148,13 @@ int ToolBox::ImplGetDragWidth() const
ButtonType determineButtonType( ImplToolItem const * 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;