-rw-r--r-- | libkdepim/kdatepicker.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index 2be9c9e..d6e9b51 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp @@ -51,13 +51,16 @@ KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) val(new KDateValidator(this)) //table(new KDateTable(this)), //fontsize(1) { setFont ( KGlobalSettings::generalFont() ); table = new KDateTable(this); - setFontSize(font().pointSize()+2); + int add = 2; + if ( QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) + add += 4; + setFontSize(font().pointSize()+add); //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")); @@ -280,13 +283,13 @@ KDatePicker::yearBackwardClicked() void KDatePicker::selectMonthClicked() { int month; KPopupFrame* popup = new KPopupFrame(this); - KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(fontsize, popup); + KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(popup); // ----- picker->resize(picker->sizeHint()); popup->setMainWidget(picker); picker->setFocus(); connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); if(popup->exec(selectMonth->mapToGlobal(QPoint(0, selectMonth->height())))) |