aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/options/OptionsWidget_message.cpp16
-rw-r--r--src/modules/url/libkviurl.cpp8
2 files changed, 12 insertions, 12 deletions
diff --git a/src/modules/options/OptionsWidget_message.cpp b/src/modules/options/OptionsWidget_message.cpp
index 47ff68796..2755bedfe 100644
--- a/src/modules/options/OptionsWidget_message.cpp
+++ b/src/modules/options/OptionsWidget_message.cpp
@@ -279,15 +279,15 @@ void MessageListWidgetItemDelegate::paint(QPainter * p, const QStyleOptionViewIt
p->drawPixmap(pt, *(g_pIconManager->getSmallIcon(it->msgType()->pixId())));
pt.setX(pt.x() + 18);
// draw the background
- if(it->msgType()->back() < 16)
+ if(it->msgType()->back() <= KVI_EXTCOLOR_MAX)
{
- QColor bColor = KVI_OPTION_MIRCCOLOR(it->msgType()->back());
+ QColor bColor = getMircColor(it->msgType()->back());
p->fillRect(pt.x(), pt.y(), opt.rect.width() - pt.x(), opt.rect.height(), bColor);
}
unsigned char ucFore = it->msgType()->fore();
- if(ucFore > 15)
+ if(ucFore > KVI_EXTCOLOR_MAX)
ucFore = 0;
- p->setPen(QPen(KVI_OPTION_MIRCCOLOR(ucFore)));
+ p->setPen(QPen(getMircColor(ucFore)));
pt.setX(pt.x() + 2);
p->drawText(pt.x(), pt.y(), opt.rect.width() - pt.x(), opt.rect.height(), Qt::AlignLeft | Qt::AlignVCenter, szText);
@@ -312,14 +312,14 @@ MessageColorListWidgetItem::MessageColorListWidgetItem(KviTalListWidget * b, int
{
m_iClrIdx = idx;
- if((idx < 0) || (idx > 15))
+ if((idx < 0) || (idx > KVI_EXTCOLOR_MAX))
{
setText(__tr2qs_ctx("Transparent", "options"));
setBackground(listWidget()->isEnabled() ? Qt::transparent : Qt::gray);
}
else
{
- setBackground(QColor(KVI_OPTION_MIRCCOLOR(m_iClrIdx)));
+ setBackground(QColor(getMircColor(m_iClrIdx)));
setText(" ");
}
}
@@ -336,9 +336,9 @@ void MessageColorListWidgetItemDelegate::paint(QPainter * p, const QStyleOptionV
const KviTalListWidget * lb = (const KviTalListWidget *)parent();
MessageColorListWidgetItem * it = static_cast<MessageColorListWidgetItem *>(index.internalPointer());
- if((it->clrIdx() >= 0) && (it->clrIdx() <= 15))
+ if((it->clrIdx() >= 0) && (it->clrIdx() <= KVI_EXTCOLOR_MAX))
{
- clr = KVI_OPTION_MIRCCOLOR(it->clrIdx());
+ clr = getMircColor(it->clrIdx());
}
else
{
diff --git a/src/modules/url/libkviurl.cpp b/src/modules/url/libkviurl.cpp
index 81144088b..a10d5171c 100644
--- a/src/modules/url/libkviurl.cpp
+++ b/src/modules/url/libkviurl.cpp
@@ -288,10 +288,10 @@ void UrlDialog::addUrl(QString url, QString window, QString count, QString times
UrlItem->setText(2, count);
UrlItem->setText(3, timestamp);
- UrlItem->setForeground(0, KVI_OPTION_MIRCCOLOR(KVI_OPTION_MSGTYPE(KVI_OUT_URL).fore()));
- UrlItem->setForeground(1, KVI_OPTION_MIRCCOLOR(KVI_OPTION_MSGTYPE(KVI_OUT_NONE).fore()));
- UrlItem->setForeground(2, KVI_OPTION_MIRCCOLOR(KVI_OPTION_MSGTYPE(KVI_OUT_NONE).fore()));
- UrlItem->setForeground(3, KVI_OPTION_MIRCCOLOR(KVI_OPTION_MSGTYPE(KVI_OUT_NONE).fore()));
+ UrlItem->setForeground(0, getMircColor(KVI_OPTION_MSGTYPE(KVI_OUT_URL).fore()));
+ UrlItem->setForeground(1, getMircColor(KVI_OPTION_MSGTYPE(KVI_OUT_NONE).fore()));
+ UrlItem->setForeground(2, getMircColor(KVI_OPTION_MSGTYPE(KVI_OUT_NONE).fore()));
+ UrlItem->setForeground(3, getMircColor(KVI_OPTION_MSGTYPE(KVI_OUT_NONE).fore()));
m_pUrlList->resizeColumnToContents(0);
m_pUrlList->resizeColumnToContents(3);