summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2005-02-08 16:24:18 (UTC)
committer zautrix <zautrix>2005-02-08 16:24:18 (UTC)
commit78c70cfbbe79243d8b0ec40f8f6438c99046e12b (patch) (side-by-side diff)
tree382bc11ad3b56f72b8f84414e1da5e5ea871204b /microkde
parent584ed7893497b2adad5ba6c3e914d90b76973b92 (diff)
downloadkdepimpi-78c70cfbbe79243d8b0ec40f8f6438c99046e12b.zip
kdepimpi-78c70cfbbe79243d8b0ec40f8f6438c99046e12b.tar.gz
kdepimpi-78c70cfbbe79243d8b0ec40f8f6438c99046e12b.tar.bz2
fix
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdatetbl.cpp36
-rw-r--r--microkde/kdatetbl.h4
-rw-r--r--microkde/kglobalsettings.cpp1
3 files changed, 25 insertions, 16 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);
diff --git a/microkde/kdatetbl.h b/microkde/kdatetbl.h
index 2efa532..87808df 100644
--- a/microkde/kdatetbl.h
+++ b/microkde/kdatetbl.h
@@ -59,3 +59,3 @@ public:
*/
- KDateInternalMonthPicker(int fontsize, QWidget* parent, const char* name=0);
+ KDateInternalMonthPicker(QWidget* parent, const char* name=0);
/**
@@ -335,3 +335,3 @@ public:
*/
- KDateInternalWeekPicker(int fontsize, QWidget* parent, const char* name=0);
+ KDateInternalWeekPicker(QWidget* parent, const char* name=0);
/**
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index 30e793f..fbbf814 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -13,2 +13,3 @@ QFont KGlobalSettings::generalFont()
QFont f = QApplication::font();
+ //qDebug("pointsize %d ", f.pointSize());
f.setPointSize( size );