summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Unidiff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp18
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
@@ -614,9 +614,18 @@ void MonthViewCell::updateCell()
614 //qApp->processEvents(); 614 //qApp->processEvents();
615} 615}
616 616
617void MonthViewCell::updateConfig() 617void MonthViewCell::updateConfig( bool bigFont ) // = false
618{ 618{
619 setFont( KOPrefs::instance()->mMonthViewFont ); 619
620 if ( bigFont ) {
621 QFont fo = KOPrefs::instance()->mMonthViewFont;
622 int ps = fo.pointSize() + 2;
623 if ( ps < 18 )
624 ps += 2;
625 fo.setPointSize( ps );
626 setFont( fo );
627 } else
628 setFont( KOPrefs::instance()->mMonthViewFont );
620 629
621 QFontMetrics fm( font() ); 630 QFontMetrics fm( font() );
622 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 ); 631 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 );
@@ -869,6 +878,7 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
869 SIGNAL( newEventSignal( QDateTime ) ) ); 878 SIGNAL( newEventSignal( QDateTime ) ) );
870 connect( cell, SIGNAL( showDaySignal( QDate ) ), 879 connect( cell, SIGNAL( showDaySignal( QDate ) ),
871 SIGNAL( showDaySignal( QDate ) ) ); 880 SIGNAL( showDaySignal( QDate ) ) );
881 cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont );
872 } 882 }
873 883
874 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); 884 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
@@ -992,6 +1002,10 @@ void KOMonthView::updateConfig()
992 for (uint i = 0; i < mCells.count(); ++i) { 1002 for (uint i = 0; i < mCells.count(); ++i) {
993 mCells[i]->updateConfig(); 1003 mCells[i]->updateConfig();
994 } 1004 }
1005
1006 for (uint i = 0; i < mCellsW.count(); ++i) {
1007 mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont);
1008 }
995#ifdef DESKTOP_VERSION 1009#ifdef DESKTOP_VERSION
996 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); 1010 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips);
997#endif 1011#endif