-rw-r--r-- | korganizer/koagenda.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 99009a5..cdeeac5 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -410,13 +410,13 @@ void KOAgenda::popupMenu() } bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) { static int startX = 0; static int startY = 0; - static int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 15 : 20 ); + int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 7 : 9 ); static bool blockMoving = true; //qDebug("KOAgenda::eventFilter_mous "); if ( object == mNewItemPopup ) { //qDebug("mNewItemPopup "); if ( me->type() == QEvent::MouseButtonRelease ) { @@ -448,12 +448,13 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) } } return true; } QPoint viewportPos; if (object != viewport()) { + blockmoveDist = blockmoveDist*2; viewportPos = ((QWidget *)object)->mapToParent(me->pos()); } else { viewportPos = me->pos(); } switch (me->type()) { @@ -467,13 +468,13 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) startY = viewportPos.y(); mPopupPos = me->globalPos(); if (object != viewport()) { mPopupItem = (KOAgendaItem *)object; mPopupKind = 1; if (me->button() == RightButton) { - mPopupKind = 3; + mPopupKind = 3; popupMenu(); } else if (me->button() == LeftButton) { mActionItem = (KOAgendaItem *)object; if (mActionItem) { emit signalClearSelection(); slotClearSelection(); @@ -497,13 +498,13 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) int gx,gy; contentsToGrid(x,y,gx,gy); mCurrentCellX = gx; mCurrentCellY = gy; mStartCellX = gx; mStartCellY = gy; - mPopupKind = 4; + mPopupKind = 4; popupMenu(); } else if (me->button() == LeftButton) { setCursor(arrowCursor); startSelectAction(viewportPos); } } |