author | drw <drw> | 2002-12-30 16:24:19 (UTC) |
---|---|---|
committer | drw <drw> | 2002-12-30 16:24:19 (UTC) |
commit | 74fae7e68acd91e61bdff6f7703021246a0c1fbc (patch) (unidiff) | |
tree | 41e9fdb306e858644b3f15e5dbc0b204009136b2 | |
parent | 627b209bfde5670061e9119a2c3038fa542c351c (diff) | |
download | opie-74fae7e68acd91e61bdff6f7703021246a0c1fbc.zip opie-74fae7e68acd91e61bdff6f7703021246a0c1fbc.tar.gz opie-74fae7e68acd91e61bdff6f7703021246a0c1fbc.tar.bz2 |
Use background color for alternating transaction lines (like todo does now).
-rw-r--r-- | noncore/apps/checkbook/checkbook.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp index 7a6b7cc..5fe660c 100644 --- a/noncore/apps/checkbook/checkbook.cpp +++ b/noncore/apps/checkbook/checkbook.cpp | |||
@@ -599,33 +599,33 @@ CBListItem::CBListItem( QListView *parent, QString label1, QString label2, | |||
599 | : QListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) | 599 | : QListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) |
600 | { | 600 | { |
601 | m_known = FALSE; | 601 | m_known = FALSE; |
602 | owner = parent; | 602 | owner = parent; |
603 | } | 603 | } |
604 | 604 | ||
605 | void CBListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) | 605 | void CBListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) |
606 | { | 606 | { |
607 | QColorGroup _cg = cg; | 607 | QColorGroup _cg = cg; |
608 | const QPixmap *pm = listView()->viewport()->backgroundPixmap(); | 608 | const QPixmap *pm = listView()->viewport()->backgroundPixmap(); |
609 | if ( pm && !pm->isNull() ) | 609 | if ( pm && !pm->isNull() ) |
610 | { | 610 | { |
611 | _cg.setBrush( QColorGroup::Base, QBrush( cg.base(), *pm ) ); | 611 | _cg.setBrush( QColorGroup::Base, QBrush( cg.base(), *pm ) ); |
612 | p->setBrushOrigin( -listView()->contentsX(), -listView()->contentsY() ); | 612 | p->setBrushOrigin( -listView()->contentsX(), -listView()->contentsY() ); |
613 | } | 613 | } |
614 | else if ( isAltBackground() ) | 614 | else if ( isAltBackground() ) |
615 | _cg.setColor(QColorGroup::Base, QColor( 200, 255, 200 ) ); | 615 | _cg.setColor(QColorGroup::Base, cg.background() ); |
616 | 616 | ||
617 | QListViewItem::paintCell(p, _cg, column, width, align); | 617 | QListViewItem::paintCell(p, _cg, column, width, align); |
618 | } | 618 | } |
619 | 619 | ||
620 | bool CBListItem::isAltBackground() | 620 | bool CBListItem::isAltBackground() |
621 | { | 621 | { |
622 | QListView *lv = static_cast<QListView *>( listView() ); | 622 | QListView *lv = static_cast<QListView *>( listView() ); |
623 | if ( lv ) | 623 | if ( lv ) |
624 | { | 624 | { |
625 | CBListItem *above = 0; | 625 | CBListItem *above = 0; |
626 | above = (CBListItem *)( itemAbove() ); | 626 | above = (CBListItem *)( itemAbove() ); |
627 | m_known = above ? above->m_known : true; | 627 | m_known = above ? above->m_known : true; |
628 | if ( m_known ) | 628 | if ( m_known ) |
629 | { | 629 | { |
630 | m_odd = above ? !above->m_odd : false; | 630 | m_odd = above ? !above->m_odd : false; |
631 | } | 631 | } |