diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-12-06 01:20:13 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2017-12-06 19:16:54 +0100 |
commit | 291ea673180a37912697646850959b3f6553cc7a (patch) | |
tree | 45cd1acac61f134de478b48f910e71976276cfa7 | |
parent | 4df7ebee49438cd963d1aed529a9eead2399dcb0 (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>
-rw-r--r-- | vcl/source/window/toolbox.cxx | 7 |
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; |