Esempio n. 1
0
void StyleHelper::drawListViewItemBackground(QPainter* p, const QRect& rc, bool bFocus, bool bSelect)
{
    if (bSelect) {
        if (bFocus) {
            p->fillRect(rc, listViewItemBackground(Active));
        } else {
            p->fillRect(rc, listViewItemBackground(Normal));
        }
    }
}
Esempio n. 2
0
void StyleHelper::drawListViewItemBackground(QPainter* p, const QRect& rc, bool bFocus, bool bSelect)
{
    QRect rcBg = rc;
    rcBg.setHeight(rcBg.height() - 1);
    if (bSelect) {
        if (bFocus) {
            p->fillRect(rcBg, listViewItemBackground(Active));
        } else {
            p->fillRect(rcBg, listViewItemBackground(Normal));
        }
    }
}
Esempio n. 3
0
void StyleHelper::drawListViewItemBackground(QPainter* p, const QRect& rc, StyleHelper::ListViewBGType bgType)
{
    QRect rcBg = rc;
    switch (bgType) {
    case ListBGTypeNone:
        //p->fillRect(rcBg, listViewItemBackground(Normal));
        break;
    case ListBGTypeActive:
        p->fillRect(rcBg, listViewItemBackground(Active));
        break;
    case ListBGTypeHalfActive:
        p->fillRect(rcBg, listViewItemBackground(Normal));
        break;
    case ListBGTypeUnread:
        p->fillRect(rcBg, QColor("#edf0ec"));
        break;
    default:
        break;
    }

}