author | zautrix <zautrix> | 2005-02-08 16:24:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-08 16:24:18 (UTC) |
commit | 78c70cfbbe79243d8b0ec40f8f6438c99046e12b (patch) (side-by-side diff) | |
tree | 382bc11ad3b56f72b8f84414e1da5e5ea871204b /microkde/kdatetbl.cpp | |
parent | 584ed7893497b2adad5ba6c3e914d90b76973b92 (diff) | |
download | kdepimpi-78c70cfbbe79243d8b0ec40f8f6438c99046e12b.zip kdepimpi-78c70cfbbe79243d8b0ec40f8f6438c99046e12b.tar.gz kdepimpi-78c70cfbbe79243d8b0ec40f8f6438c99046e12b.tar.bz2 |
fix
-rw-r--r-- | microkde/kdatetbl.cpp | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp index e827412..990cfb9 100644 --- a/microkde/kdatetbl.cpp +++ b/microkde/kdatetbl.cpp @@ -83,3 +83,3 @@ KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f) { - setFontSize(10); + setFont( KGlobalSettings::generalFont() ); if(!date_.isValid()) @@ -112,9 +112,8 @@ KDateTable::paintCell(QPainter *painter, int row, int col) QBrush brushLightblue(QColor(220,245,255)); - QFont font=KGlobalSettings::generalFont(); + QFont _font=font(); // ----- - font.setPointSize(fontsize); if(row==0) { // we are drawing the headline - font.setBold(true); - painter->setFont(font); + _font.setBold(true); + painter->setFont(_font); bool normalday = true; @@ -150,3 +149,3 @@ KDateTable::paintCell(QPainter *painter, int row, int col) } else { - painter->setFont(font); + painter->setFont(_font); pos=7*(row-1)+col; @@ -302,6 +301,7 @@ KDateTable::setFontSize(int size) fontsize=size; - QFont font = KGlobalSettings::generalFont(); - font.setPointSize(fontsize); - font.setBold( true ); - QFontMetrics metrics(font); + QFont _font = font(); + _font.setPointSize(fontsize); + setFont( _font ); + _font.setBold( true ); + QFontMetrics metrics(_font); @@ -445,3 +445,3 @@ KDateTable::sizeHint() const KDateInternalMonthPicker::KDateInternalMonthPicker -(int fontsize, QWidget* parent, const char* name) +(QWidget* parent, const char* name) : QGridView(parent, name), @@ -455,3 +455,7 @@ KDateInternalMonthPicker::KDateInternalMonthPicker font=KGlobalSettings::generalFont(); - //font.setPointSize(fontsize); + int fontsize = 10; + int add = 2; + if ( QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) + add += 6; + font.setPointSize(fontsize+add); setFont(font); @@ -763,3 +767,3 @@ void KDateTable::virtual_hook( int, void* ) KDateInternalWeekPicker::KDateInternalWeekPicker -(int fontsize, QWidget* parent, const char* name) +(QWidget* parent, const char* name) : QGridView(parent, name), @@ -773,3 +777,7 @@ KDateInternalWeekPicker::KDateInternalWeekPicker font=KGlobalSettings::generalFont(); - //font.setPointSize(fontsize); + int fontsize = 10; + int add = 2; + if ( QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) + add += 4; + font.setPointSize(fontsize+add); setFont(font); |