forked from qt-creator/qt-creator
ScxmlEditor: Make the Attribute Editor table themable
...by not using hardcoded colors. Task-number: QTCREATORBUG-18685 Change-Id: Idbe694b4112cb2c7d82738598fb04c68c510c609 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
@@ -117,8 +117,6 @@ QVariant SCAttributeItemModel::data(const QModelIndex &index, int role) const
|
||||
return Qt::AlignHCenter;
|
||||
else
|
||||
break;
|
||||
case Qt::ForegroundRole:
|
||||
return bExtraRow ? QBrush(Qt::gray) : QBrush(Qt::black);
|
||||
case DataTypeRole: {
|
||||
if (m_tag->tagType() == Metadata || m_tag->tagType() == MetadataItem)
|
||||
return (int)QVariant::String;
|
||||
@@ -148,7 +146,7 @@ Qt::ItemFlags SCAttributeItemModel::flags(const QModelIndex &index) const
|
||||
if (m_tag->tagType() <= MetadataItem || (index.column() == 1 && m_tag->info()->n_attributes > 0 && m_tag->info()->attributes[index.row()].editable))
|
||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
|
||||
|
||||
return Qt::NoItemFlags;
|
||||
return index.column() == 0 ? Qt::ItemIsEnabled : Qt::NoItemFlags;
|
||||
}
|
||||
|
||||
int SCAttributeItemModel::columnCount(const QModelIndex &parent) const
|
||||
|
||||
Reference in New Issue
Block a user