Kaydet (Commit) 291ea673 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

tdf#114262 Respect text+image toolbar style

Regression of 67c9d054
("fdo#84938: replace TIB_ constants with enum").

Change-Id: Ib90473a80fd491f4a136b4e76864c107a9240990
Reviewed-on: https://gerrit.libreoffice.org/45920Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
üst 4df7ebee
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment