From e3d52f513dac0fea228593087c03b775351d03c5 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Wed, 20 Aug 2014 11:29:24 +0200 Subject: [PATCH] check if parent is combobox before not rendering toolbar separators --- kstyle/breezestyle.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index cea468df..475fafec 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -3448,11 +3448,16 @@ namespace Breeze } //___________________________________________________________________________________ - bool Style::drawIndicatorToolBarSeparatorPrimitive( const QStyleOption* option, QPainter* painter, const QWidget* ) const + bool Style::drawIndicatorToolBarSeparatorPrimitive( const QStyleOption* option, QPainter* painter, const QWidget* widget ) const { - // do nothing if disabled from options - if( !StyleConfigData::toolBarDrawItemSeparator() ) return true; + /* + do nothing if disabled from options + also need to check if widget is a combobox, because of Qt hack using 'toolbar' separator primitive + for rendering separators in comboboxes + */ + if( !( StyleConfigData::toolBarDrawItemSeparator() || qobject_cast( widget ) ) ) + { return true; } // store rect and palette const QRect& rect( option->rect );