summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-04 17:45:57 (UTC)
committer zautrix <zautrix>2005-02-04 17:45:57 (UTC)
commitf4c3a3e3da57e957b920fe4662c6decd6764f0ee (patch) (side-by-side diff)
tree05648d7d7ac6a0e4798cad08b2993df1375d84d5 /korganizer
parentb7c502a598566264e6e7129524104b6e39438f03 (diff)
downloadkdepimpi-f4c3a3e3da57e957b920fe4662c6decd6764f0ee.zip
kdepimpi-f4c3a3e3da57e957b920fe4662c6decd6764f0ee.tar.gz
kdepimpi-f4c3a3e3da57e957b920fe4662c6decd6764f0ee.tar.bz2
fixxx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp18
-rw-r--r--korganizer/komonthview.h2
-rw-r--r--korganizer/koprefs.cpp3
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/koprefsdialog.cpp5
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
@@ -614,9 +614,18 @@ void MonthViewCell::updateCell()
//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 );
@@ -869,6 +878,7 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
SIGNAL( newEventSignal( QDateTime ) ) );
connect( cell, SIGNAL( showDaySignal( QDate ) ),
SIGNAL( showDaySignal( QDate ) ) );
+ cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont );
}
//connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
@@ -992,6 +1002,10 @@ void KOMonthView::updateConfig()
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
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index b89b2bc..700f098 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -143,7 +143,7 @@ class MonthViewCell : public QWidget
void insertEvent(Event *);
void insertTodo(Todo *);
- void updateConfig();
+ void updateConfig( bool bigFont = false );
void enableScrollBars( bool );
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 2fb7c36..ea5aaa1 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -245,7 +245,8 @@ KOPrefs::KOPrefs() :
addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true);
addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false);
addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false);
- addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false);
+ addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true);
+ addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true);
addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false);
addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false);
#ifdef DESKTOP_VERSION
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 6541af2..dddcdca 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -240,6 +240,7 @@ class KOPrefs : public KPimPrefs
bool mWNViewShowLocation;
bool mTodoViewShowsPercentage;
bool mTodoViewUsesCatColors;
+ bool mMonthViewUsesBigFont;
bool mTodoViewUsesSmallFont;
bool mTodoViewUsesForegroundColor;
bool mMonthViewUsesForegroundColor;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 580dff2..452d019 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -759,7 +759,10 @@ void KOPrefsDialog::setupViewsTab()
&(KOPrefs::instance()->mEnableMonthScroll),topFrame);
topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0);
#endif
-
+ dummy =
+ addWidBool(i18n("Week view mode uses bigger font"),
+ &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame);
+ topLayout->addWidget(dummy->checkBox(),ii++,0);
dummy =
addWidBool(i18n("Show Sat/Sun together"),
&(KOPrefs::instance()->mMonthViewSatSunTog),topFrame);