-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 | |||
@@ -904,32 +904,35 @@ void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, | |||
904 | #endif | 904 | #endif |
905 | } | 905 | } |
906 | 906 | ||
907 | void KOMonthView::updateConfig() | 907 | void KOMonthView::updateConfig() |
908 | { | 908 | { |
909 | 909 | ||
910 | mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); | 910 | mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); |
911 | 911 | ||
912 | if ( mShowWeekView ) | 912 | if ( mShowWeekView ) { |
913 | mWeekStartsMonday = true; | 913 | mWeekStartsMonday = true; |
914 | } | ||
914 | QFontMetrics fontmetric(mDayLabels[0]->font()); | 915 | QFontMetrics fontmetric(mDayLabels[0]->font()); |
915 | mWidthLongDayLabel = 0; | 916 | mWidthLongDayLabel = 0; |
916 | 917 | ||
917 | for (int i = 0; i < 7; i++) { | 918 | for (int i = 0; i < 7; i++) { |
918 | int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); | 919 | int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); |
919 | if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; | 920 | if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; |
920 | } | 921 | } |
921 | bool temp = mShowSatSunComp ; | 922 | bool temp = mShowSatSunComp ; |
922 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; | 923 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; |
924 | if ( ! mShowWeekView ) { | ||
923 | if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) | 925 | if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) |
924 | computeLayout(); | 926 | computeLayout(); |
927 | } | ||
925 | updateDayLabels(); | 928 | updateDayLabels(); |
926 | //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); | 929 | //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); |
927 | int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; | 930 | //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; |
928 | //resizeEvent( 0 ); | 931 | //resizeEvent( 0 ); |
929 | for (uint i = 0; i < mCells.count(); ++i) { | 932 | for (uint i = 0; i < mCells.count(); ++i) { |
930 | mCells[i]->updateConfig(); | 933 | mCells[i]->updateConfig(); |
931 | } | 934 | } |
932 | #ifdef DESKTOP_VERSION | 935 | #ifdef DESKTOP_VERSION |
933 | MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); | 936 | MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); |
934 | #endif | 937 | #endif |
935 | updateView(); | 938 | updateView(); |