Commit 7a9f3d9d authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Do not paint icons for property rows

Change-Id: I8abd54b20371ffaec37c044e8cdefe4010c520dd
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent 790f1757
...@@ -67,10 +67,18 @@ static bool isVisible(const QAbstractItemModel *model, const QModelIndex &modelI ...@@ -67,10 +67,18 @@ static bool isVisible(const QAbstractItemModel *model, const QModelIndex &modelI
return model->data(modelIndex, ItemIsVisibleRole).toBool(); return model->data(modelIndex, ItemIsVisibleRole).toBool();
} }
static bool rowIsPropertyRole(const QAbstractItemModel *model, const QModelIndex &modelIndex)
{
return model->data(modelIndex, RowIsPropertyRole).toBool();
}
void IconCheckboxItemDelegate::paint(QPainter *painter, void IconCheckboxItemDelegate::paint(QPainter *painter,
const QStyleOptionViewItem &styleOption, const QStyleOptionViewItem &styleOption,
const QModelIndex &modelIndex) const const QModelIndex &modelIndex) const
{ {
if (rowIsPropertyRole(modelIndex.model(), modelIndex))
return; //Do not paint icons for property rows
const int yOffset = (styleOption.rect.height() const int yOffset = (styleOption.rect.height()
- (m_checkedPixmap.height() / painter->device()->devicePixelRatio())) / 2; - (m_checkedPixmap.height() / painter->device()->devicePixelRatio())) / 2;
const int xOffset = 2; const int xOffset = 2;
......
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