summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2005-04-30 07:32:03 (UTC)
committer zautrix <zautrix>2005-04-30 07:32:03 (UTC)
commit7c31102a00920834ab8e3778f0f459b96b2fb309 (patch) (side-by-side diff)
tree9f238caaaab4ba150e4f14708d85162af0ea5092 /microkde
parentbdaded2da25b0ccef80d6e638fa12f92a4f8744d (diff)
downloadkdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.zip
kdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.tar.gz
kdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.tar.bz2
fixes
Diffstat (limited to 'microkde') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdatetbl.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp
index 2d97c8c..4271b55 100644
--- a/microkde/kdatetbl.cpp
+++ b/microkde/kdatetbl.cpp
@@ -788,4 +788,9 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
setFrameStyle(QFrame::NoFrame);
+ if ( QApplication::desktop()->height() > 240 ) {
setNumRows(13);
setNumCols(4);
+ } else {
+ setNumRows(4);
+ setNumCols(13);
+ }
// enable to find drawing failures:
@@ -833,4 +838,4 @@ KDateInternalWeekPicker::viewportResizeEvent(QResizeEvent*)
{
- setCellWidth(width()/4);
- setCellHeight(height()/13);
+ setCellWidth(width()/ numCols());
+ setCellHeight(height()/ numRows());
}
@@ -843,3 +848,3 @@ KDateInternalWeekPicker::paintCell(QPainter* painter, int row, int col)
// ----- find the number of the cell:
- index=4*row+col+1;
+ index=numCols()*row+col+1;
text=QString::number( index );
@@ -935,3 +940,3 @@ KDateInternalWeekPicker::contentsMouseReleaseEvent(QMouseEvent *e)
}
- pos=4*row+col+1;
+ pos=numCols()*row+col+1;
result=pos;