-rw-r--r-- | libkdepim/kdatepicker.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index d8bc9f5..2be9c9e 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp @@ -28,16 +28,17 @@ #include <qdialog.h> #include <qtoolbutton.h> #include <qfont.h> #include <qapplication.h> #include <qlineedit.h> #include <qvalidator.h> #include <kdebug.h> #include <knotifyclient.h> +#include <kglobalsettings.h> #include "kdatetbl.h" #include "kdateedit.h" //#include "kdatepicker.moc" KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) : QFrame(parent,name), yearForward(new QToolButton(this)), @@ -46,24 +47,19 @@ KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) monthBackward(new QToolButton(this)), selectMonth(new QToolButton(this)), selectYear(new QToolButton(this)), //line(new QLineEdit(this)), val(new KDateValidator(this)) //table(new KDateTable(this)), //fontsize(1) { - // ----- - int size = 12; - if ( QApplication::desktop()->width() >= 480 ) - size = 18; - fontsize = size; - setFont ( QFont("helvetica",size) ); + setFont ( KGlobalSettings::generalFont() ); table = new KDateTable(this); - setFontSize(size); + setFontSize(font().pointSize()+2); //line->setValidator(val); lineDate = new KDateEdit( this, "dateediipicker", true ); yearForward->setPixmap(SmallIcon("2rightarrowB")); yearBackward->setPixmap(SmallIcon("2leftarrowB")); monthForward->setPixmap(SmallIcon("1rightarrowB")); monthBackward->setPixmap(SmallIcon("1leftarrowB")); setDate(dt); // set button texts connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate))); |