-rw-r--r-- | korganizer/komonthview.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index daa37fd..dfa89e2 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -605,27 +605,36 @@ void MonthViewCell::updateCell() } // insert due todos QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); Todo *todo; for(todo = todos.first(); todo; todo = todos.next()) { insertTodo( todo ); } finishUpdateCell(); // if ( isVisible()) //qApp->processEvents(); } -void MonthViewCell::updateConfig() +void MonthViewCell::updateConfig( bool bigFont ) // = false { - setFont( KOPrefs::instance()->mMonthViewFont ); + + if ( bigFont ) { + QFont fo = KOPrefs::instance()->mMonthViewFont; + int ps = fo.pointSize() + 2; + if ( ps < 18 ) + ps += 2; + fo.setPointSize( ps ); + setFont( fo ); + } else + setFont( KOPrefs::instance()->mMonthViewFont ); QFontMetrics fm( font() ); mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 ); mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 ); mHolidayPalette = mStandardPalette; mPrimaryPalette = mStandardPalette; mNonPrimaryPalette = mStandardPalette; if ( KOPrefs::instance()->mMonthViewUsesDayColors ) { mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor ); mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor ); mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark()); mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark()); @@ -860,24 +869,25 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) } mCellsW.resize( mDaysPerWeek ); for( col = 0; col < mDaysPerWeek; ++col ) { MonthViewCell *cell = new MonthViewCell( this, mWeekView ); mCellsW.insert( col, cell ); connect( cell, SIGNAL( defaultAction( Incidence * ) ), SLOT( defaultAction( Incidence * ) ) ); connect( cell, SIGNAL( newEventSignal( QDateTime ) ), SIGNAL( newEventSignal( QDateTime ) ) ); connect( cell, SIGNAL( showDaySignal( QDate ) ), SIGNAL( showDaySignal( QDate ) ) ); + cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont ); } //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); mContextMenu = eventPopup(); // updateConfig(); //useless here //mWeekLabels[mNumWeeks]->setText( i18n("W")); #if 0 mWidStack = new QWidgetStack( this ); mMonthView = new QWidget( mWidStack ); mWeekView = new QWidget( mWidStack ); #endif @@ -983,24 +993,28 @@ void KOMonthView::updateConfig() 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; //resizeEvent( 0 ); for (uint i = 0; i < mCells.count(); ++i) { mCells[i]->updateConfig(); } + + for (uint i = 0; i < mCellsW.count(); ++i) { + mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont); + } #ifdef DESKTOP_VERSION MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); #endif updateView(); } void KOMonthView::updateDayLabels() { QPtrVector<QLabel> *mDayLabelsT; #if 0 if (mShowWeekView ) |