author | zautrix <zautrix> | 2005-03-20 14:04:37 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-20 14:04:37 (UTC) |
commit | 69d75020eea5f95b9f5d77d97ed85ec8869d32db (patch) (unidiff) | |
tree | 378b920b9392e7ed4472597e586154d7b99b0645 /korganizer/kodaymatrix.cpp | |
parent | 289dd44f4f23d92c45d8f28c867a14a980fd5dde (diff) | |
download | kdepimpi-69d75020eea5f95b9f5d77d97ed85ec8869d32db.zip kdepimpi-69d75020eea5f95b9f5d77d97ed85ec8869d32db.tar.gz kdepimpi-69d75020eea5f95b9f5d77d97ed85ec8869d32db.tar.bz2 |
layout fixes
-rw-r--r-- | korganizer/kodaymatrix.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 619ae39..9181936 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -775,24 +775,35 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) | |||
775 | // reset color to actual color | 775 | // reset color to actual color |
776 | if (!mHolidays[i].isNull()) { | 776 | if (!mHolidays[i].isNull()) { |
777 | p.setPen(actcol); | 777 | p.setPen(actcol); |
778 | } | 778 | } |
779 | // reset bold font to plain font | 779 | // reset bold font to plain font |
780 | if (events[i] > 0) { | 780 | if (events[i] > 0) { |
781 | QFont myFont = font(); | 781 | QFont myFont = font(); |
782 | myFont.setBold(false); | 782 | myFont.setBold(false); |
783 | p.setFont(myFont); | 783 | p.setFont(myFont); |
784 | } | 784 | } |
785 | } | 785 | } |
786 | bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); | 786 | bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); |
787 | } | 787 | } |
788 | 788 | ||
789 | // ---------------------------------------------------------------------------- | 789 | // ---------------------------------------------------------------------------- |
790 | // R E SI Z E E V E N T H A N D L I N G | 790 | // R E SI Z E E V E N T H A N D L I N G |
791 | // ---------------------------------------------------------------------------- | 791 | // ---------------------------------------------------------------------------- |
792 | 792 | ||
793 | void KODayMatrix::resizeEvent(QResizeEvent *) | 793 | void KODayMatrix::resizeEvent(QResizeEvent *) |
794 | { | 794 | { |
795 | QRect sz = frameRect(); | 795 | QRect sz = frameRect(); |
796 | daysize.setHeight(sz.height()*7 / NUMDAYS); | 796 | daysize.setHeight(sz.height()*7 / NUMDAYS); |
797 | daysize.setWidth(sz.width() / 7); | 797 | daysize.setWidth(sz.width() / 7); |
798 | } | 798 | } |
799 | |||
800 | QSize KODayMatrix::sizeHint() const | ||
801 | { | ||
802 | |||
803 | QFontMetrics fm ( font() ); | ||
804 | int wid = fm.width( "30") *7+7; | ||
805 | int hei = fm.height() * 6+4; | ||
806 | //qDebug("KODayMatrix::sizeHint()********************* %d %d", wid , hei); | ||
807 | return QSize ( wid, hei ); | ||
808 | |||
809 | } | ||