summaryrefslogtreecommitdiffabout
path: root/microkde/kdatetbl.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kdatetbl.cpp') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdatetbl.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp
index fce0e5a..e827412 100644
--- a/microkde/kdatetbl.cpp
+++ b/microkde/kdatetbl.cpp
@@ -198,8 +198,12 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
painter->setPen(pen);
painter->drawText(0, 0, w, h, AlignCenter, text, -1, &rect);
}
+ /*
if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width());
- if(rect.height()>maxCell.height()) maxCell.setHeight(rect.height());
+ if(rect.height()>maxCell.height()) {
+ maxCell.setHeight(rect.height());
+ }
+ */
}
void
@@ -313,9 +317,15 @@ KDateTable::setFontSize(int size)
// ----- compare with a real wide number and add some space:
rect=metrics.boundingRect(QString::fromLatin1("88"));
maxCell.setWidth(QMAX(maxCell.width()+2, rect.width()));
+#ifdef DESKTOP_VERSION
+ maxCell.setHeight(QMAX(maxCell.height()+8, rect.height()));
+#else
maxCell.setHeight(QMAX(maxCell.height()+4, rect.height()));
- if ( maxCell.width() * 1000 / maxCell.height() > 1900 )
+#endif
+ if ( maxCell.width() * 1000 / maxCell.height() > 1900 ) {
maxCell.setHeight(maxCell.width() * 1000 / 1900 );
+ qDebug("setmax ");
+ }
}
void
@@ -443,7 +453,7 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
activeCol = -1;
activeRow = -1;
font=KGlobalSettings::generalFont();
- font.setPointSize(fontsize);
+ //font.setPointSize(fontsize);
setFont(font);
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
@@ -761,7 +771,7 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
activeCol = -1;
activeRow = -1;
font=KGlobalSettings::generalFont();
- font.setPointSize(fontsize);
+ //font.setPointSize(fontsize);
setFont(font);
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
@@ -782,7 +792,11 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
if(max.width()<rect.width()) max.setWidth(rect.width());
if(max.height()<rect.height()) max.setHeight(rect.height());
}
+ if ( QApplication::desktop()->width() > 640 ) {
+ max.setWidth(max.width()+6);
+ max.setHeight(max.height()+8);
+ }
}
QSize