mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-21 17:18:43 +02:00
Improve color scheme
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "SubaddressModel.h"
|
||||
#include "Subaddress.h"
|
||||
#include "ModelUtils.h"
|
||||
#include "utils/ColorScheme.h"
|
||||
|
||||
#include <QPoint>
|
||||
#include <QColor>
|
||||
@@ -56,8 +57,13 @@ QVariant SubaddressModel::data(const QModelIndex &index, int role) const
|
||||
result = parseSubaddressRow(subaddress, index, role);
|
||||
}
|
||||
else if (role == Qt::BackgroundRole) {
|
||||
if (subaddress.isUsed()) {
|
||||
result = QBrush(QColor(255,100,100));
|
||||
switch(index.column()) {
|
||||
case Address:
|
||||
{
|
||||
if (subaddress.isUsed()) {
|
||||
result = QBrush(ColorScheme::RED.asColor(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (role == Qt::FontRole) {
|
||||
@@ -68,6 +74,16 @@ QVariant SubaddressModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (role == Qt::ToolTipRole) {
|
||||
switch(index.column()) {
|
||||
case Address:
|
||||
{
|
||||
if (subaddress.isUsed()) {
|
||||
result = "This address is used.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!found)
|
||||
|
||||
Reference in New Issue
Block a user