author | zautrix <zautrix> | 2004-09-17 11:42:59 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-17 11:42:59 (UTC) |
commit | dd33ac512eb4b4b647fb3423f7cdb39ec322221b (patch) (unidiff) | |
tree | ea35b070c856a7233df08419ef0d189a665820f6 | |
parent | d7a6a271b48f0c79e1f3beca03bbc9c3f2a54050 (diff) | |
download | kdepimpi-dd33ac512eb4b4b647fb3423f7cdb39ec322221b.zip kdepimpi-dd33ac512eb4b4b647fb3423f7cdb39ec322221b.tar.gz kdepimpi-dd33ac512eb4b4b647fb3423f7cdb39ec322221b.tar.bz2 |
Fixed datepicker
-rw-r--r-- | libkdepim/kdatepicker.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index 3fe139c..d8bc9f5 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp | |||
@@ -65,7 +65,6 @@ KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) | |||
65 | yearBackward->setPixmap(SmallIcon("2leftarrowB")); | 65 | yearBackward->setPixmap(SmallIcon("2leftarrowB")); |
66 | monthForward->setPixmap(SmallIcon("1rightarrowB")); | 66 | monthForward->setPixmap(SmallIcon("1rightarrowB")); |
67 | monthBackward->setPixmap(SmallIcon("1leftarrowB")); | 67 | monthBackward->setPixmap(SmallIcon("1leftarrowB")); |
68 | |||
69 | setDate(dt); // set button texts | 68 | setDate(dt); // set button texts |
70 | connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate))); | 69 | connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate))); |
71 | connect(table, SIGNAL(tableClicked()), SLOT(tableClickedSlot())); | 70 | connect(table, SIGNAL(tableClicked()), SLOT(tableClickedSlot())); |
@@ -105,8 +104,12 @@ KDatePicker::resizeEvent(QResizeEvent*) | |||
105 | // ----- calculate button row height: | 104 | // ----- calculate button row height: |
106 | for(count=0; count<NoOfButtons; ++count) { | 105 | for(count=0; count<NoOfButtons; ++count) { |
107 | int xS = buttons[count]->sizeHint().width(); | 106 | int xS = buttons[count]->sizeHint().width(); |
108 | int yS = buttons[count]->sizeHint().height(); | 107 | int yS = buttons[count]->sizeHint().height(); |
109 | sizes[count]=QSize ( xS+10, yS ); | 108 | if ( QApplication::desktop()->width() < 320 ) |
109 | sizes[count]=QSize ( xS+4, yS ); | ||
110 | else | ||
111 | sizes[count]=QSize ( xS+10, yS ); | ||
112 | |||
110 | buttonHeight=QMAX(buttonHeight, sizes[count].height()); | 113 | buttonHeight=QMAX(buttonHeight, sizes[count].height()); |
111 | } | 114 | } |
112 | buttonHeight += 10; | 115 | buttonHeight += 10; |