summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-04 22:01:37 (UTC)
committer zautrix <zautrix>2005-07-04 22:01:37 (UTC)
commitd7931731fcf0ffeb5b5267f25fce741ebe1ced13 (patch) (side-by-side diff)
tree87c5e91d5df7d80c6218b0f52323bfdeab24949e /korganizer
parent35f1ad23e06a0f6014d98c952e8b8652b5cffc49 (diff)
downloadkdepimpi-d7931731fcf0ffeb5b5267f25fce741ebe1ced13.zip
kdepimpi-d7931731fcf0ffeb5b5267f25fce741ebe1ced13.tar.gz
kdepimpi-d7931731fcf0ffeb5b5267f25fce741ebe1ced13.tar.bz2
next pix wech
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp24
-rw-r--r--korganizer/koagendaitem.h1
-rw-r--r--korganizer/koagendaview.cpp2
3 files changed, 11 insertions, 16 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 9fe1be4..abb29f7 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -346,3 +346,3 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
if ( mSelected ) {
- pa.begin( paintPixSel() );
+ pa.begin( this );
} else {
@@ -359,3 +359,6 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
else
- yy = mCellYTop * ( height() / cellHeight() );
+ yy = mCellYTop * ( height() / cellHeight() );
+ if ( mSelected ) {
+ pa.translate( -x, -yy );
+ }
xPaintCoord= x;
@@ -472,3 +475,2 @@ void KOAgendaItem::resizePixmap( int w , int h )
paintPix()->resize( w, h );
- paintPixSel()->resize( w, h );
@@ -495,12 +497,3 @@ QPixmap * KOAgendaItem::paintPixAllday()
}
-QPixmap * KOAgendaItem::paintPixSel()
-{
- static QPixmap* mPaintPixSel = 0;
- if ( ! mPaintPixSel ) {
- int w = QApplication::desktop()->width();
- int h = QApplication::desktop()->height();
- mPaintPixSel = new QPixmap(w,h);
- }
- return mPaintPixSel ;
-}
+
void KOAgendaItem::paintEvent ( QPaintEvent *e )
@@ -529,2 +522,4 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
globalFlagBlockAgendaItemUpdate = 1;
+ if ( mSelected )
+ return;
}
@@ -539,3 +534,4 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
if ( mSelected ) {
- paintFrom = paintPixSel();
+ paintMe( mSelected );
+ return;
} else {
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index dc2316a..7103abe 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -105,3 +105,2 @@ class KOAgendaItem : public QWidget
static QPixmap * paintPix();
- static QPixmap * paintPixSel();
static QPixmap * paintPixAllday();
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 5a63b35..f811fba 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -605,3 +605,3 @@ KOAgendaView::~KOAgendaView()
delete KOAgendaItem::paintPix();
- delete KOAgendaItem::paintPixSel();
+ delete KOAgendaItem::paintPixAllday();
}