summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-04-08 22:05:03 (UTC)
committer zautrix <zautrix>2005-04-08 22:05:03 (UTC)
commit9667e6f2589d5b2080cca928814f382761f8dda6 (patch) (side-by-side diff)
tree438bcb5c041de0804284cf457cbc97a367dadf37 /kaddressbook
parentc0f1d38e29ee0d0a1d1dcb5bda08089923926b41 (diff)
downloadkdepimpi-9667e6f2589d5b2080cca928814f382761f8dda6.zip
kdepimpi-9667e6f2589d5b2080cca928814f382761f8dda6.tar.gz
kdepimpi-9667e6f2589d5b2080cca928814f382761f8dda6.tar.bz2
utf8 kapi import fix
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/cardview.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp
index 84d3116..b6e053f 100644
--- a/kaddressbook/views/cardview.cpp
+++ b/kaddressbook/views/cardview.cpp
@@ -927,42 +927,41 @@ CardViewItem *CardView::findItem(const QString &text, const QString &label,
*/
uint CardView::columnWidth()
{
return d->mDrawSeparators ?
d->mItemWidth + ( 2 * d->mItemSpacing ) + d->mSepWidth :
d->mItemWidth + d->mItemSpacing;
}
void CardView::drawContents(QPainter *p, int clipx, int clipy,
int clipw, int cliph)
{
- QScrollView::drawContents(p, clipx, clipy, clipw, cliph);
-
+ //QScrollView::drawContents(p, clipx, clipy, clipw, cliph);
if (d->mLayoutDirty)
calcLayout();
//kdDebug() << "CardView::drawContents: " << clipx << ", " << clipy
// << ", " << clipw << ", " << cliph << endl;
QColorGroup cg = viewport()->palette().active(); // allow setting costum colors in the viewport pale
-
+ int cX, cY;
+ contentsToViewport ( clipx, clipy, cX, cY );
QRect clipRect(clipx, clipy, clipw, cliph);
QRect cardRect;
QRect sepRect;
CardViewItem *item;
CardViewSeparator *sep;
-
// make sure the viewport is a pure background
- viewport()->erase(clipRect);
+ viewport()->erase( QRect ( cX, cY , clipw, cliph ) );
// Now tell the cards to draw, if they are in the clip region
QPtrListIterator<CardViewItem> iter(d->mItemList);
for (iter.toFirst(); iter.current(); ++iter)
{
item = *iter;
cardRect.setRect( item->d->x, item->d->y, d->mItemWidth, item->height() );
if (clipRect.intersects(cardRect) || clipRect.contains(cardRect))
{
//kdDebug() << "\trepainting card at: " << cardRect.x() << ", "
// << cardRect.y() << endl;