-rw-r--r-- | microkde/kdatetbl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp index 1024796..d182279 100644 --- a/microkde/kdatetbl.cpp +++ b/microkde/kdatetbl.cpp @@ -413,97 +413,97 @@ KDateTable::setDate(const QDate& date_) } const QDate& KDateTable::getDate() const { return date; } void KDateTable::focusInEvent( QFocusEvent *e ) { repaintContents(false); QGridView::focusInEvent( e ); } void KDateTable::focusOutEvent( QFocusEvent *e ) { repaintContents(false); QGridView::focusOutEvent( e ); } QSize KDateTable::sizeHint() const { if(maxCell.height()>0 && maxCell.width()>0) { return QSize((maxCell.width()+2)*numCols()+2*frameWidth(), (maxCell.height()+4)*numRows()+2*frameWidth()); } else { return QSize(-1, -1); } } KDateInternalMonthPicker::KDateInternalMonthPicker (QWidget* parent, const char* name) : QGridView(parent, name), result(0) // invalid { QRect rect; QFont font; // ----- activeCol = -1; activeRow = -1; font=KGlobalSettings::generalFont(); int fontsize = 10; int add = 2; if ( QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) add += 8; if ( QApplication::desktop()->width() > 640 ) - add += 4; + add += 6; font.setPointSize(fontsize+add); setFont(font); setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); setFrameStyle(QFrame::NoFrame); setNumRows(4); setNumCols(3); // enable to find drawing failures: // setTableFlags(Tbl_clipCellPainting); #if 0 viewport()->setEraseColor(lightGray); // for consistency with the datepicker #endif // ----- find the preferred size // (this is slow, possibly, but unfortunatly it is needed here): QFontMetrics metrics(font); for(int i=1; i <= 12; ++i) { rect=metrics.boundingRect(KGlobal::locale()->monthName(i, false)); if(max.width()<rect.width()) max.setWidth(rect.width()); if(max.height()<rect.height()) max.setHeight(rect.height()); } } QSize KDateInternalMonthPicker::sizeHint() const { return QSize((max.width()+6)*numCols()+2*frameWidth(), (max.height()+6)*numRows()+2*frameWidth()); } int KDateInternalMonthPicker::getResult() const { return result; } void KDateInternalMonthPicker::setupPainter(QPainter *p) { p->setPen(black); } void KDateInternalMonthPicker::viewportResizeEvent(QResizeEvent*) { setCellWidth(width()/3); setCellHeight(height()/4); |