mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-10 17:59:04 -04:00
Improved decode highlighting
Add "Settings->Colors->Decode Highlighting" context menu buttons to unset b/g and f/g colours. Add colour value as #rrggbb or unset in text to list items. Improved colour assignment to decodes giving better and more intuitive behaviour.
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
#include <QVariant>
|
||||
#include <QList>
|
||||
#include <QBrush>
|
||||
#include <QFont>
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMap>
|
||||
#include <QVector>
|
||||
#include <QDataStream>
|
||||
@@ -160,7 +161,10 @@ QVariant DecodeHighlightingModel::data (const QModelIndex& index, int role) cons
|
||||
result = item.enabled_ ? Qt::Checked : Qt::Unchecked;
|
||||
break;
|
||||
case Qt::DisplayRole:
|
||||
result = highlight_name (item.type_);
|
||||
return QString {"%1 [f/g:%2, b/g:%3]"}
|
||||
.arg (highlight_name (item.type_))
|
||||
.arg (item.foreground_.style () != Qt::NoBrush ? QString {"#%1"}.arg (item.foreground_.color ().rgb () & 0xffffff, 6, 16, QChar {'0'}) : QString {"unset"})
|
||||
.arg (item.background_.style () != Qt::NoBrush ? QString {"#%1"}.arg (item.background_.color ().rgb () & 0xffffff, 6, 16, QChar {'0'}) : QString {"unset"});
|
||||
break;
|
||||
case Qt::ForegroundRole:
|
||||
if (Qt::NoBrush != item.foreground_.style ())
|
||||
|
||||
Reference in New Issue
Block a user