summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Unidiff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 9b9e164..6ae4c6f 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -790,8 +790,10 @@ void MonthViewCell::selection( QListBoxItem *item )
790KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) 790KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
791 : KOEventView( calendar, parent, name ), 791 : KOEventView( calendar, parent, name ),
792 mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), 792 mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ),
793 mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) 793 mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
794{ 794{
795 mShortDayLabelsM = false;
796 mShortDayLabelsW = false;
795 skipResize = false; 797 skipResize = false;
796 clPending = true; 798 clPending = true;
797 mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" ); 799 mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" );
@@ -1050,26 +1052,26 @@ void KOMonthView::updateDayLabels()
1050 mDayLabelsT = &mDayLabelsW; 1052 mDayLabelsT = &mDayLabelsW;
1051 for (int i = 0; i < 7; i++) { 1053 for (int i = 0; i < 7; i++) {
1052 if (mWeekStartsMonday) { 1054 if (mWeekStartsMonday) {
1053 bool show = mShortDayLabels; 1055 bool show = mShortDayLabelsW;
1054 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) 1056 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
1055 show = true; 1057 show = true;
1056 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); 1058 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
1057 } else { 1059 } else {
1058 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); 1060 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsW));
1059 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); 1061 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsW));
1060 1062
1061 } 1063 }
1062 } 1064 }
1063 mDayLabelsT = &mDayLabels; 1065 mDayLabelsT = &mDayLabels;
1064 for (int i = 0; i < 7; i++) { 1066 for (int i = 0; i < 7; i++) {
1065 if (mWeekStartsMonday) { 1067 if (mWeekStartsMonday) {
1066 bool show = mShortDayLabels; 1068 bool show = mShortDayLabelsM;
1067 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) 1069 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
1068 show = true; 1070 show = true;
1069 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); 1071 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
1070 } else { 1072 } else {
1071 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); 1073 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsM));
1072 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); 1074 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsM));
1073 1075
1074 } 1076 }
1075 } 1077 }
@@ -1386,7 +1388,7 @@ void KOMonthView::computeLayoutWeek()
1386 mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1388 mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1387 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1389 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1388 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1390 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1389 mShortDayLabels = mDayLabelsW[0]->width() < mWidthLongDayLabel ; 1391 mShortDayLabelsW = mDayLabelsW[0]->width()-2 < mWidthLongDayLabel ;
1390 updateDayLabels(); 1392 updateDayLabels();
1391 //bool forceUpdate = !updatePossible; 1393 //bool forceUpdate = !updatePossible;
1392 updatePossible = true; 1394 updatePossible = true;
@@ -1502,7 +1504,7 @@ void KOMonthView::computeLayout()
1502 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1504 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1503 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1505 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1504 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1506 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1505 mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; 1507 mShortDayLabelsM = mDayLabels[0]->width()-2 < mWidthLongDayLabel ;
1506 updateDayLabels(); 1508 updateDayLabels();
1507 //bool forceUpdate = !updatePossible; 1509 //bool forceUpdate = !updatePossible;
1508 updatePossible = true; 1510 updatePossible = true;