From dd33ac512eb4b4b647fb3423f7cdb39ec322221b Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 17 Sep 2004 11:42:59 +0000 Subject: Fixed datepicker --- (limited to 'libkdepim/kdatepicker.cpp') 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) yearBackward->setPixmap(SmallIcon("2leftarrowB")); monthForward->setPixmap(SmallIcon("1rightarrowB")); monthBackward->setPixmap(SmallIcon("1leftarrowB")); - setDate(dt); // set button texts connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate))); connect(table, SIGNAL(tableClicked()), SLOT(tableClickedSlot())); @@ -105,8 +104,12 @@ KDatePicker::resizeEvent(QResizeEvent*) // ----- calculate button row height: for(count=0; countsizeHint().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()); } buttonHeight += 10; -- cgit v0.9.0.2