author | zautrix <zautrix> | 2005-02-08 23:15:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-08 23:15:22 (UTC) |
commit | d0ab37d35ca9a9d919c9fc4856f3314bfef6dd5a (patch) (unidiff) | |
tree | 751d52e216392132e8ad36ba9e8a23ae64083951 /microkde/kdatetbl.cpp | |
parent | 2124ce7f8c6edbd0e3ec32b1d1e6a625ef9450d6 (diff) | |
download | kdepimpi-d0ab37d35ca9a9d919c9fc4856f3314bfef6dd5a.zip kdepimpi-d0ab37d35ca9a9d919c9fc4856f3314bfef6dd5a.tar.gz kdepimpi-d0ab37d35ca9a9d919c9fc4856f3314bfef6dd5a.tar.bz2 |
fff
-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 | |||
@@ -437,49 +437,49 @@ KDateTable::sizeHint() const | |||
437 | { | 437 | { |
438 | return QSize((maxCell.width()+2)*numCols()+2*frameWidth(), | 438 | return QSize((maxCell.width()+2)*numCols()+2*frameWidth(), |
439 | (maxCell.height()+4)*numRows()+2*frameWidth()); | 439 | (maxCell.height()+4)*numRows()+2*frameWidth()); |
440 | } else { | 440 | } else { |
441 | return QSize(-1, -1); | 441 | return QSize(-1, -1); |
442 | } | 442 | } |
443 | } | 443 | } |
444 | 444 | ||
445 | KDateInternalMonthPicker::KDateInternalMonthPicker | 445 | KDateInternalMonthPicker::KDateInternalMonthPicker |
446 | (QWidget* parent, const char* name) | 446 | (QWidget* parent, const char* name) |
447 | : QGridView(parent, name), | 447 | : QGridView(parent, name), |
448 | result(0) // invalid | 448 | result(0) // invalid |
449 | { | 449 | { |
450 | QRect rect; | 450 | QRect rect; |
451 | QFont font; | 451 | QFont font; |
452 | // ----- | 452 | // ----- |
453 | activeCol = -1; | 453 | activeCol = -1; |
454 | activeRow = -1; | 454 | activeRow = -1; |
455 | font=KGlobalSettings::generalFont(); | 455 | font=KGlobalSettings::generalFont(); |
456 | int fontsize = 10; | 456 | int fontsize = 10; |
457 | int add = 2; | 457 | int add = 2; |
458 | if ( QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) | 458 | if ( QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) |
459 | add += 8; | 459 | add += 8; |
460 | if ( QApplication::desktop()->width() > 640 ) | 460 | if ( QApplication::desktop()->width() > 640 ) |
461 | add += 4; | 461 | add += 6; |
462 | font.setPointSize(fontsize+add); | 462 | font.setPointSize(fontsize+add); |
463 | setFont(font); | 463 | setFont(font); |
464 | setHScrollBarMode(AlwaysOff); | 464 | setHScrollBarMode(AlwaysOff); |
465 | setVScrollBarMode(AlwaysOff); | 465 | setVScrollBarMode(AlwaysOff); |
466 | setFrameStyle(QFrame::NoFrame); | 466 | setFrameStyle(QFrame::NoFrame); |
467 | setNumRows(4); | 467 | setNumRows(4); |
468 | setNumCols(3); | 468 | setNumCols(3); |
469 | // enable to find drawing failures: | 469 | // enable to find drawing failures: |
470 | // setTableFlags(Tbl_clipCellPainting); | 470 | // setTableFlags(Tbl_clipCellPainting); |
471 | #if 0 | 471 | #if 0 |
472 | viewport()->setEraseColor(lightGray); // for consistency with the datepicker | 472 | viewport()->setEraseColor(lightGray); // for consistency with the datepicker |
473 | #endif | 473 | #endif |
474 | // ----- find the preferred size | 474 | // ----- find the preferred size |
475 | // (this is slow, possibly, but unfortunatly it is needed here): | 475 | // (this is slow, possibly, but unfortunatly it is needed here): |
476 | QFontMetrics metrics(font); | 476 | QFontMetrics metrics(font); |
477 | for(int i=1; i <= 12; ++i) | 477 | for(int i=1; i <= 12; ++i) |
478 | { | 478 | { |
479 | rect=metrics.boundingRect(KGlobal::locale()->monthName(i, false)); | 479 | rect=metrics.boundingRect(KGlobal::locale()->monthName(i, false)); |
480 | if(max.width()<rect.width()) max.setWidth(rect.width()); | 480 | if(max.width()<rect.width()) max.setWidth(rect.width()); |
481 | if(max.height()<rect.height()) max.setHeight(rect.height()); | 481 | if(max.height()<rect.height()) max.setHeight(rect.height()); |
482 | } | 482 | } |
483 | 483 | ||
484 | } | 484 | } |
485 | 485 | ||