From d5c53970b9e12bfe774d1fecd603080aded24e09 Mon Sep 17 00:00:00 2001 From: zautrix Date: Tue, 05 Jun 2007 13:21:33 +0000 Subject: print fix --- (limited to 'korganizer') diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index b378330..192f8c0 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -1406,6 +1406,7 @@ void KOListViewListView::printList() clearSelection (); QPainter p; p.begin ( &printer ); + p.setFont(font()); QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); float dx, dy; int wid = (m.width() * 9)/10; @@ -1432,7 +1433,26 @@ void KOListViewListView::printList() header()->paintSection ( & p, header()->mapToIndex (iii), rect ); } p.translate( 0, header()->height()); - drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () ); + //drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () ); + + const QColorGroup &cg = colorGroup(); + KOListViewItem* item = (KOListViewItem* )firstChild(); + int yOff = 0; + while ( item ) { + p.translate( 0, yOff ); + p.save(); + for ( iii = 0; iii < cou; ++iii ) { + int align = columnAlignment( iii ); + if ( align == AlignAuto ) align = AlignLeft; + p.restore(); + p.save(); + p.translate( header()->sectionPos( iii ), 0); + item->paintCell( &p, cg, iii, header()->sectionSize (iii), align ); + } + yOff = item->height(); + item = (KOListViewItem* )(item->itemBelow()); + p.restore(); + } p.end(); #endif } -- cgit v0.9.0.2