author | zautrix <zautrix> | 2005-02-02 12:48:28 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-02 12:48:28 (UTC) |
commit | 66c1429e6d29331dac4182d2c42aaf1630916c7d (patch) (side-by-side diff) | |
tree | 27280cf745c2828cfa22ec52049cfd8e96d28f4f /korganizer/komonthview.cpp | |
parent | e770226d68f5fdb8484003bbb9898848cec901a8 (diff) | |
download | kdepimpi-66c1429e6d29331dac4182d2c42aaf1630916c7d.zip kdepimpi-66c1429e6d29331dac4182d2c42aaf1630916c7d.tar.gz kdepimpi-66c1429e6d29331dac4182d2c42aaf1630916c7d.tar.bz2 |
fifi
-rw-r--r-- | korganizer/komonthview.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index f2cfb75..ab96786 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -888,64 +888,67 @@ DateList KOMonthView::selectedDates() { DateList selected; if ( mSelectedCell ) { QDate qd = mSelectedCell->selectedIncidenceDate(); if ( qd.isValid() ) selected.append( qd ); } return selected; } void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td) { #ifndef KORG_NOPRINTER calPrinter->preview(CalPrinter::Month, fd, td); #endif } void KOMonthView::updateConfig() { mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); - if ( mShowWeekView ) + if ( mShowWeekView ) { mWeekStartsMonday = true; + } QFontMetrics fontmetric(mDayLabels[0]->font()); mWidthLongDayLabel = 0; for (int i = 0; i < 7; i++) { int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; } bool temp = mShowSatSunComp ; mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; + if ( ! mShowWeekView ) { if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) computeLayout(); + } updateDayLabels(); //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); - int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; + //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; //resizeEvent( 0 ); for (uint i = 0; i < mCells.count(); ++i) { mCells[i]->updateConfig(); } #ifdef DESKTOP_VERSION MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); #endif updateView(); } void KOMonthView::updateDayLabels() { for (int i = 0; i < 7; i++) { if (mWeekStartsMonday) { bool show = mShortDayLabels; if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > mDayLabels[i]->width() ) show = true; mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); } else { if (i==0) mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); else mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); } |