summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kdatepicker.cpp9
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
@@ -66,5 +66,4 @@ KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name)
monthForward->setPixmap(SmallIcon("1rightarrowB"));
monthBackward->setPixmap(SmallIcon("1leftarrowB"));
-
setDate(dt); // set button texts
connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate)));
@@ -106,6 +105,10 @@ KDatePicker::resizeEvent(QResizeEvent*)
for(count=0; count<NoOfButtons; ++count) {
int xS = buttons[count]->sizeHint().width();
- int yS = buttons[count]->sizeHint().height();
- sizes[count]=QSize ( xS+10, yS );
+ int yS = buttons[count]->sizeHint().height();
+ if ( QApplication::desktop()->width() < 320 )
+ sizes[count]=QSize ( xS+4, yS );
+ else
+ sizes[count]=QSize ( xS+10, yS );
+
buttonHeight=QMAX(buttonHeight, sizes[count].height());
}