mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Add setting to allow user to change the background color of NULL value fields
See issue #163
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "sqlitedb.h"
|
||||
#include "sqlite.h"
|
||||
|
||||
#include "PreferencesDialog.h"
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
#include <QApplication>
|
||||
@@ -243,6 +244,10 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
|
||||
if(m_data.at(index.row()).at(index.column()).isNull() || isBinary(index))
|
||||
return QColor(Qt::gray);
|
||||
return QColor(Qt::black);
|
||||
} else if (role == Qt::BackgroundRole) {
|
||||
if(m_data.at(index.row()).at(index.column()).isNull() || isBinary(index))
|
||||
return QColor(PreferencesDialog::getSettingsValue("syntaxhighlighter", "null_colour").toString());
|
||||
return QVariant();
|
||||
} else {
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user