summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2017-08-08 19:14:29 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2017-08-09 11:44:28 +0000
commit8507f6ae55c9cd6f882435d7944eedc1fe12edf4 (patch)
tree760f44ddb19665923392af9392565ad3dc460df3
parent3a195ffb9ab6bed409b6d35dee4492f91a3eda66 (diff)
downloadqt-creator-8507f6ae55c9cd6f882435d7944eedc1fe12edf4.tar.gz
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>
-rw-r--r--src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.cpp b/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.cpp
index 30d561a952..38fe97e667 100644
--- a/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.cpp
+++ b/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.cpp
@@ -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