summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-25 10:59:43 (UTC)
committer zautrix <zautrix>2005-06-25 10:59:43 (UTC)
commit70e025b560e0060804610c182d3b04a6e6a63b70 (patch) (unidiff)
treea9847909ef7878ccb39c69cfec16568bc3632ea6
parentb81bdd12cadbae5a3ab5a7f1f689bb4ae45cf315 (diff)
downloadkdepimpi-70e025b560e0060804610c182d3b04a6e6a63b70.zip
kdepimpi-70e025b560e0060804610c182d3b04a6e6a63b70.tar.gz
kdepimpi-70e025b560e0060804610c182d3b04a6e6a63b70.tar.bz2
fixxxx
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagenda.cpp54
1 files changed, 52 insertions, 2 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index fc213d8..b99625c 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -457,5 +457,5 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
457 viewportPos = me->pos(); 457 viewportPos = me->pos();
458 } 458 }
459 459 bool objIsNotViewport = (object != viewport());
460 switch (me->type()) { 460 switch (me->type()) {
461 case QEvent::MouseButtonPress: 461 case QEvent::MouseButtonPress:
@@ -468,5 +468,55 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
468 startY = viewportPos.y(); 468 startY = viewportPos.y();
469 mPopupPos = me->globalPos(); 469 mPopupPos = me->globalPos();
470 if (object != viewport()) { 470 if ( objIsNotViewport ) {
471 KOAgendaItem * tempItem = (KOAgendaItem *)object;
472 if (mAllDayMode) {
473 if ( tempItem->height() > 10 ) {
474 int minV = tempItem->height()/4;
475 if ( minV > (blockmoveDist/2)-2 )
476 minV = (blockmoveDist/2)-2;
477 bool border = false;
478 int diff = tempItem->y() - viewportPos.y();
479 if ( diff < 0 )
480 diff *= -1;
481 if ( diff < minV ) {
482 border = true;
483 objIsNotViewport = false;
484 }
485 if ( ! border ) {
486 diff = tempItem->y() + tempItem->height()- viewportPos.y();
487 if ( diff < 0 )
488 diff *= -1;
489 if ( diff < minV ) {
490 border = true;
491 objIsNotViewport = false;
492 }
493 }
494 }
495 } else { // not allday
496 if ( tempItem->width() > 10 ) {
497 int minH = tempItem->width()/4;
498 if ( minH > (blockmoveDist/2)-2 )
499 minH = (blockmoveDist/2)-2;
500 bool border = false;
501 int diff = tempItem->x() - viewportPos.x();
502 if ( diff < 0 )
503 diff *= -1;
504 if ( diff < minH ) {
505 border = true;
506 objIsNotViewport = false;
507 }
508 if ( ! border ) {
509 diff = tempItem->x() + tempItem->width() - viewportPos.x();
510 if ( diff < 0 )
511 diff *= -1;
512 if ( diff < minH ) {
513 border = true;
514 objIsNotViewport = false;
515 }
516 }
517 }
518 }
519 }
520 if ( objIsNotViewport ) {
471 mPopupItem = (KOAgendaItem *)object; 521 mPopupItem = (KOAgendaItem *)object;
472 mPopupKind = 1; 522 mPopupKind = 1;