-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 | |||
@@ -49,17 +49,20 @@ KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) | |||
49 | selectYear(new QToolButton(this)), | 49 | selectYear(new QToolButton(this)), |
50 | //line(new QLineEdit(this)), | 50 | //line(new QLineEdit(this)), |
51 | val(new KDateValidator(this)) | 51 | val(new KDateValidator(this)) |
52 | //table(new KDateTable(this)), | 52 | //table(new KDateTable(this)), |
53 | //fontsize(1) | 53 | //fontsize(1) |
54 | { | 54 | { |
55 | setFont ( KGlobalSettings::generalFont() ); | 55 | setFont ( KGlobalSettings::generalFont() ); |
56 | table = new KDateTable(this); | 56 | table = new KDateTable(this); |
57 | setFontSize(font().pointSize()+2); | 57 | int add = 2; |
58 | if ( QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) | ||
59 | add += 4; | ||
60 | setFontSize(font().pointSize()+add); | ||
58 | //line->setValidator(val); | 61 | //line->setValidator(val); |
59 | lineDate = new KDateEdit( this, "dateediipicker", true ); | 62 | lineDate = new KDateEdit( this, "dateediipicker", true ); |
60 | yearForward->setPixmap(SmallIcon("2rightarrowB")); | 63 | yearForward->setPixmap(SmallIcon("2rightarrowB")); |
61 | yearBackward->setPixmap(SmallIcon("2leftarrowB")); | 64 | yearBackward->setPixmap(SmallIcon("2leftarrowB")); |
62 | monthForward->setPixmap(SmallIcon("1rightarrowB")); | 65 | monthForward->setPixmap(SmallIcon("1rightarrowB")); |
63 | monthBackward->setPixmap(SmallIcon("1leftarrowB")); | 66 | monthBackward->setPixmap(SmallIcon("1leftarrowB")); |
64 | setDate(dt); // set button texts | 67 | setDate(dt); // set button texts |
65 | connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate))); | 68 | connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate))); |
@@ -278,17 +281,17 @@ KDatePicker::yearBackwardClicked() | |||
278 | setDate(temp); | 281 | setDate(temp); |
279 | } | 282 | } |
280 | 283 | ||
281 | void | 284 | void |
282 | KDatePicker::selectMonthClicked() | 285 | KDatePicker::selectMonthClicked() |
283 | { | 286 | { |
284 | int month; | 287 | int month; |
285 | KPopupFrame* popup = new KPopupFrame(this); | 288 | KPopupFrame* popup = new KPopupFrame(this); |
286 | KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(fontsize, popup); | 289 | KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(popup); |
287 | // ----- | 290 | // ----- |
288 | picker->resize(picker->sizeHint()); | 291 | picker->resize(picker->sizeHint()); |
289 | popup->setMainWidget(picker); | 292 | popup->setMainWidget(picker); |
290 | picker->setFocus(); | 293 | picker->setFocus(); |
291 | connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); | 294 | connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); |
292 | if(popup->exec(selectMonth->mapToGlobal(QPoint(0, selectMonth->height())))) | 295 | if(popup->exec(selectMonth->mapToGlobal(QPoint(0, selectMonth->height())))) |
293 | { | 296 | { |
294 | QDate date; | 297 | QDate date; |