author | zautrix <zautrix> | 2005-03-20 20:24:06 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-20 20:24:06 (UTC) |
commit | b32c8de5dcd6c4f8dce9415fb686970e2c991ebb (patch) (unidiff) | |
tree | ee5ba00bcc830d011a816981fd20dcf781b9cbf5 /korganizer | |
parent | 64068741e3b82a34c1b8a67da412ac88841b640c (diff) | |
download | kdepimpi-b32c8de5dcd6c4f8dce9415fb686970e2c991ebb.zip kdepimpi-b32c8de5dcd6c4f8dce9415fb686970e2c991ebb.tar.gz kdepimpi-b32c8de5dcd6c4f8dce9415fb686970e2c991ebb.tar.bz2 |
nf
-rw-r--r-- | korganizer/kodaymatrix.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index f864022..ae0a051 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -442,9 +442,19 @@ QString KODayMatrix::getHolidayLabel(int offset) | |||
442 | } | 442 | } |
443 | 443 | ||
444 | int KODayMatrix::getDayIndexFrom(int x, int y) | 444 | int KODayMatrix::getDayIndexFrom(int x, int y) |
445 | { | 445 | { |
446 | int colModulo = (width()-2) % 7; | ||
447 | int rowModulo = (height()-2) % 6; | ||
448 | #if 0 | ||
446 | return 7*(y/daysize.height()) + (KOGlobals::self()->reverseLayout() ? | 449 | return 7*(y/daysize.height()) + (KOGlobals::self()->reverseLayout() ? |
447 | 6 - x/daysize.width() : x/daysize.width()); | 450 | 6 - x/daysize.width() : x/daysize.width()); |
451 | #endif | ||
452 | int xVal = (x-colModulo/2-2)/daysize.width(); | ||
453 | int yVal = (y-rowModulo/2-2)/daysize.height(); | ||
454 | |||
455 | |||
456 | return 7*(yVal) + xVal; | ||
457 | |||
448 | } | 458 | } |
449 | 459 | ||
450 | // ---------------------------------------------------------------------------- | 460 | // ---------------------------------------------------------------------------- |
@@ -642,7 +652,7 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) | |||
642 | int xyOff = frameWidth(); | 652 | int xyOff = frameWidth(); |
643 | int colModulo = sz.width() % 7; | 653 | int colModulo = sz.width() % 7; |
644 | int rowModulo = sz.height() % 6; | 654 | int rowModulo = sz.height() % 6; |
645 | qDebug("col %d row %d ",colModulo,rowModulo ); | 655 | //qDebug("col %d row %d ",colModulo,rowModulo ); |
646 | 656 | ||
647 | bool isRTL = KOGlobals::self()->reverseLayout(); | 657 | bool isRTL = KOGlobals::self()->reverseLayout(); |
648 | 658 | ||