summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-04 21:06:02 (UTC)
committer zautrix <zautrix>2005-07-04 21:06:02 (UTC)
commit2767ffda27fa0e88816832d4b2c6efdd0c52a8eb (patch) (side-by-side diff)
tree8194ee4b7019698d08d47892e428e254f45d5500 /korganizer
parent16898aecbedb978169efef1e1e0233578a42a46e (diff)
downloadkdepimpi-2767ffda27fa0e88816832d4b2c6efdd0c52a8eb.zip
kdepimpi-2767ffda27fa0e88816832d4b2c6efdd0c52a8eb.tar.gz
kdepimpi-2767ffda27fa0e88816832d4b2c6efdd0c52a8eb.tar.bz2
highlight pix smaller
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 94c3b22..63fdecd 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1271,50 +1271,68 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
off += vySel;
//qDebug("OFF %d %d %d", off,vySel, vy );
bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP);
} else {
bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP);
}
}
if ( mSelectionHeight > 0 ) {
//qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) {
contentsToViewport ( selectionX, mSelectionYTop, vx,vy);
- bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP);
+ // bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP);
+ int hei = mSelectionHeight;
+ int offset = 0;
+ while ( hei > 0 ) {
+ int p_hei = 5;
+ if ( hei < 5 ) p_hei = hei;
+ hei -= 5;
+ bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP);
+ offset += 5;
+ }
}
}
p->begin( pd );
} else {
if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() )
;//drawContentsToPainter();
QPaintDevice* pd = p->device();
p->end();
int vx, vy;
int selectionX = KOGlobals::self()->reverseLayout() ?
(mColumns - 1 - mSelectionCellX) * mGridSpacingX :
mSelectionCellX * mGridSpacingX;
contentsToViewport ( cx, cy, vx,vy);
// qDebug(" %d %d %d %d ", cx, cy, cw,ch) ;
if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) )
bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP);
if ( mSelectionHeight > 0 ) {
//qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) {
contentsToViewport ( selectionX, mSelectionYTop, vx,vy);
- bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP);
+ //bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP);
+ int hei = mSelectionHeight;
+ int offset = 0;
+ while ( hei > 0 ) {
+ int p_hei = 5;
+ if ( hei < 5 ) p_hei = hei;
+ hei -= 5;
+ bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP);
+ offset += 5;
+ }
}
}
p->begin( pd );
}
}
void KOAgenda::finishUpdate()
{
KOAgendaItem *item;
globalFlagBlockAgendaItemPaint = 1;
@@ -1369,26 +1387,26 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
if ( ! mGridSpacingX || ! mGridSpacingY ||! mHolidayMask )
return;
if ( globalFlagBlockAgenda > 1 && globalFlagBlockAgenda < 4 )
return;
int cx = 0, cy = 0, cw = contentsWidth(), ch = contentsHeight();
if ( ch < 1 )
ch = 1;
if ( mPaintPixmap.width() < contentsWidth()+42 || mPaintPixmap.height() < ch ) {
mPaintPixmap.resize( contentsWidth()+42, ch );
}
mCurPixWid = contentsWidth();
mCurPixHei = ch;
- if ( mHighlightPixmap.width() < mGridSpacingX-1 || mHighlightPixmap.height() < ch ) {
- mHighlightPixmap.resize( mGridSpacingX-1, ch );
+ if ( mHighlightPixmap.width() < mGridSpacingX-1 ) {
+ mHighlightPixmap.resize( mGridSpacingX-1, 5 );
mHighlightPixmap.fill ( KOPrefs::instance()->mHighlightColor );
}
mPixPainter.begin( &mPaintPixmap) ;
//qDebug("wid %d hei %d ",mPaintPixmap.width(),mPaintPixmap.height() );
QPainter * p ;
if (paint == 0) {
mPaintPixmap.fill(KOPrefs::instance()->mAgendaBgColor);
p = &mPixPainter;
}
else
p = paint ;
// qDebug("++++++KOAgenda::drawContentsTo Painter %d %d %d %d ", cx, cy, cw, ch);