summaryrefslogtreecommitdiffabout
path: root/microkde/kdatetbl.cpp
Unidiff
Diffstat (limited to 'microkde/kdatetbl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdatetbl.cpp36
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)
83{ 83{
84 setFontSize(10); 84 setFont( KGlobalSettings::generalFont() );
85 if(!date_.isValid()) 85 if(!date_.isValid())
@@ -112,9 +112,8 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
112 QBrush brushLightblue(QColor(220,245,255)); 112 QBrush brushLightblue(QColor(220,245,255));
113 QFont font=KGlobalSettings::generalFont(); 113 QFont _font=font();
114 // ----- 114 // -----
115 font.setPointSize(fontsize);
116 if(row==0) 115 if(row==0)
117 { // we are drawing the headline 116 { // we are drawing the headline
118 font.setBold(true); 117 _font.setBold(true);
119 painter->setFont(font); 118 painter->setFont(_font);
120 bool normalday = true; 119 bool normalday = true;
@@ -150,3 +149,3 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
150 } else { 149 } else {
151 painter->setFont(font); 150 painter->setFont(_font);
152 pos=7*(row-1)+col; 151 pos=7*(row-1)+col;
@@ -302,6 +301,7 @@ KDateTable::setFontSize(int size)
302 fontsize=size; 301 fontsize=size;
303 QFont font = KGlobalSettings::generalFont(); 302 QFont _font = font();
304 font.setPointSize(fontsize); 303 _font.setPointSize(fontsize);
305 font.setBold( true ); 304 setFont( _font );
306 QFontMetrics metrics(font); 305 _font.setBold( true );
306 QFontMetrics metrics(_font);
307 307
@@ -445,3 +445,3 @@ KDateTable::sizeHint() const
445KDateInternalMonthPicker::KDateInternalMonthPicker 445KDateInternalMonthPicker::KDateInternalMonthPicker
446(int fontsize, QWidget* parent, const char* name) 446(QWidget* parent, const char* name)
447 : QGridView(parent, name), 447 : QGridView(parent, name),
@@ -455,3 +455,7 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
455 font=KGlobalSettings::generalFont(); 455 font=KGlobalSettings::generalFont();
456 //font.setPointSize(fontsize); 456 int fontsize = 10;
457 int add = 2;
458 if ( QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 )
459 add += 6;
460 font.setPointSize(fontsize+add);
457 setFont(font); 461 setFont(font);
@@ -763,3 +767,3 @@ void KDateTable::virtual_hook( int, void* )
763KDateInternalWeekPicker::KDateInternalWeekPicker 767KDateInternalWeekPicker::KDateInternalWeekPicker
764(int fontsize, QWidget* parent, const char* name) 768(QWidget* parent, const char* name)
765 : QGridView(parent, name), 769 : QGridView(parent, name),
@@ -773,3 +777,7 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
773 font=KGlobalSettings::generalFont(); 777 font=KGlobalSettings::generalFont();
774 //font.setPointSize(fontsize); 778 int fontsize = 10;
779 int add = 2;
780 if ( QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 )
781 add += 4;
782 font.setPointSize(fontsize+add);
775 setFont(font); 783 setFont(font);