From 15460f70e39cb37e3a5fb933e1ee2ec9e040033d Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Tue, 19 Mar 2019 21:02:35 -0400 Subject: [PATCH] Fix inappropriate default color that made DBC messages default to a bad color scheme for dark themes --- dbc/dbchandler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dbc/dbchandler.cpp b/dbc/dbchandler.cpp index dbd33ac..b1353c2 100644 --- a/dbc/dbchandler.cpp +++ b/dbc/dbchandler.cpp @@ -809,7 +809,7 @@ void DBCFile::loadFile(QString fileName) if (parseAttribute(line.right(line.length() - 12), attr)) { - qDebug() << "Success"; + //qDebug() << "Success"; attr.attrType = SIG; dbc_attributes.append(attr); } @@ -831,7 +831,7 @@ void DBCFile::loadFile(QString fileName) if (parseAttribute(line.right(line.length() - 12), attr)) { - qDebug() << "Success"; + //qDebug() << "Success"; attr.attrType = NODE; dbc_attributes.append(attr); } @@ -855,7 +855,7 @@ void DBCFile::loadFile(QString fileName) if (!bgAttr) { attr.attrType = MESSAGE; - attr.defaultValue = QColor(Qt::white).name(); + attr.defaultValue = QApplication::palette().color(QPalette::Base).name(); attr.enumVals.clear(); attr.lower = 0; attr.upper = 0; @@ -1366,7 +1366,7 @@ int DBCHandler::createBlankFile() //add our custom attributes to the new file so that we know they're already there. attr.attrType = MESSAGE; - attr.defaultValue = QColor(Qt::white).name(); + attr.defaultValue = QApplication::palette().color(QPalette::Base).name(); attr.enumVals.clear(); attr.lower = 0; attr.upper = 0;