-rw-r--r-- | korganizer/komonthview.cpp | 18 | ||||
-rw-r--r-- | korganizer/komonthview.h | 2 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 3 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 5 |
5 files changed, 24 insertions, 5 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index daa37fd..dfa89e2 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -613,11 +613,20 @@ void MonthViewCell::updateCell() | |||
613 | // if ( isVisible()) | 613 | // if ( isVisible()) |
614 | //qApp->processEvents(); | 614 | //qApp->processEvents(); |
615 | } | 615 | } |
616 | 616 | ||
617 | void MonthViewCell::updateConfig() | 617 | void 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 ); |
623 | mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 ); | 632 | mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 ); |
@@ -868,8 +877,9 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
868 | connect( cell, SIGNAL( newEventSignal( QDateTime ) ), | 877 | connect( cell, SIGNAL( newEventSignal( QDateTime ) ), |
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() ) ); |
875 | mContextMenu = eventPopup(); | 885 | mContextMenu = eventPopup(); |
@@ -991,8 +1001,12 @@ void KOMonthView::updateConfig() | |||
991 | //resizeEvent( 0 ); | 1001 | //resizeEvent( 0 ); |
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 |
998 | updateView(); | 1012 | updateView(); |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index b89b2bc..700f098 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -142,9 +142,9 @@ class MonthViewCell : public QWidget | |||
142 | void finishUpdateCell(); | 142 | void finishUpdateCell(); |
143 | void insertEvent(Event *); | 143 | void insertEvent(Event *); |
144 | void insertTodo(Todo *); | 144 | void insertTodo(Todo *); |
145 | 145 | ||
146 | void updateConfig(); | 146 | void updateConfig( bool bigFont = false ); |
147 | 147 | ||
148 | void enableScrollBars( bool ); | 148 | void enableScrollBars( bool ); |
149 | 149 | ||
150 | Incidence *selectedIncidence(); | 150 | Incidence *selectedIncidence(); |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 2fb7c36..ea5aaa1 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -244,9 +244,10 @@ KOPrefs::KOPrefs() : | |||
244 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); | 244 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); |
245 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); | 245 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); |
246 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); | 246 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); |
247 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); | 247 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); |
248 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false); | 248 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); |
249 | addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); | ||
249 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); | 250 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); |
250 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); | 251 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); |
251 | #ifdef DESKTOP_VERSION | 252 | #ifdef DESKTOP_VERSION |
252 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); | 253 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 6541af2..dddcdca 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -239,8 +239,9 @@ class KOPrefs : public KPimPrefs | |||
239 | bool mWNViewShowsPast; | 239 | bool mWNViewShowsPast; |
240 | bool mWNViewShowLocation; | 240 | bool mWNViewShowLocation; |
241 | bool mTodoViewShowsPercentage; | 241 | bool mTodoViewShowsPercentage; |
242 | bool mTodoViewUsesCatColors; | 242 | bool mTodoViewUsesCatColors; |
243 | bool mMonthViewUsesBigFont; | ||
243 | bool mTodoViewUsesSmallFont; | 244 | bool mTodoViewUsesSmallFont; |
244 | bool mTodoViewUsesForegroundColor; | 245 | bool mTodoViewUsesForegroundColor; |
245 | bool mMonthViewUsesForegroundColor; | 246 | bool mMonthViewUsesForegroundColor; |
246 | 247 | ||
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 580dff2..452d019 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -758,9 +758,12 @@ void KOPrefsDialog::setupViewsTab() | |||
758 | addWidBool(i18n("Enable scrollbars in month view cells"), | 758 | addWidBool(i18n("Enable scrollbars in month view cells"), |
759 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 759 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
760 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 760 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
761 | #endif | 761 | #endif |
762 | 762 | dummy = | |
763 | addWidBool(i18n("Week view mode uses bigger font"), | ||
764 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); | ||
765 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
763 | dummy = | 766 | dummy = |
764 | addWidBool(i18n("Show Sat/Sun together"), | 767 | addWidBool(i18n("Show Sat/Sun together"), |
765 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 768 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
766 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 769 | topLayout->addWidget(dummy->checkBox(),ii++,0); |