author | zautrix <zautrix> | 2005-02-08 16:24:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-08 16:24:18 (UTC) |
commit | 78c70cfbbe79243d8b0ec40f8f6438c99046e12b (patch) (unidiff) | |
tree | 382bc11ad3b56f72b8f84414e1da5e5ea871204b /libkdepim/kdatepicker.cpp | |
parent | 584ed7893497b2adad5ba6c3e914d90b76973b92 (diff) | |
download | kdepimpi-78c70cfbbe79243d8b0ec40f8f6438c99046e12b.zip kdepimpi-78c70cfbbe79243d8b0ec40f8f6438c99046e12b.tar.gz kdepimpi-78c70cfbbe79243d8b0ec40f8f6438c99046e12b.tar.bz2 |
fix
-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) | |||
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")); |
@@ -280,13 +283,13 @@ KDatePicker::yearBackwardClicked() | |||
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())))) |