From ab3236f6694f17f6c0ca7141aa3a2949f6fc7ee6 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 4 Apr 2018 00:21:33 +0300 Subject: [PATCH] Property delegate changed --- limereport/objectinspector/lrpropertydelegate.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/limereport/objectinspector/lrpropertydelegate.cpp b/limereport/objectinspector/lrpropertydelegate.cpp index 80bd4d0..acb9c20 100644 --- a/limereport/objectinspector/lrpropertydelegate.cpp +++ b/limereport/objectinspector/lrpropertydelegate.cpp @@ -62,14 +62,12 @@ void LimeReport::PropertyDelegate::paint(QPainter *painter, const QStyleOptionVi painter->save(); painter->setPen(option.palette.color(QPalette::HighlightedText)); painter->setBackground(QBrush(option.palette.color(QPalette::Highlight))); - //drawBackground(painter,option,index); cellOpt.widget->style()->drawPrimitive(QStyle::PE_IndicatorBranch,&primitiveOpt,painter); cellOpt.rect.adjust(primitiveOpt.rect.width(),0,0,0); cellOpt.font.setBold(true); cellOpt.palette.setColor(QPalette::Text,cellOpt.palette.color(QPalette::BrightText)); cellOpt.text = LimeReport::extractClassName(node->propertyName()); style->drawControl(QStyle::CE_ItemViewItem, &cellOpt, painter, cellOpt.widget); - //drawDisplay(painter,cellOpt,cellOpt.rect,LimeReport::extractClassName(node->propertyName())); painter->restore(); } } else { @@ -92,13 +90,13 @@ void LimeReport::PropertyDelegate::paint(QPainter *painter, const QStyleOptionVi else so.palette.setColor(QPalette::Text,Qt::black); -// drawBackground(painter,option,index); - opt.text = ""; + opt.rect.setHeight(opt.rect.height()-1); style->drawControl(QStyle::CE_ItemViewItem, &opt, painter, opt.widget); if (!node->paint(painter,so,index)){ so.state &= ~QStyle::State_HasFocus; + so.rect.adjust(0,0,0,-1); QStyledItemDelegate::paint(painter, so, index); } @@ -117,6 +115,8 @@ void LimeReport::PropertyDelegate::paint(QPainter *painter, const QStyleOptionVi painter->drawLine(start,end); painter->restore(); } + + } } }