summaryrefslogtreecommitdiffabout
path: root/korganizer/journalentry.cpp
authorzautrix <zautrix>2005-07-09 08:48:32 (UTC)
committer zautrix <zautrix>2005-07-09 08:48:32 (UTC)
commitf731dd9fc5b3f14c44d4de26eb5370a79c63887c (patch) (side-by-side diff)
treee3d7b3929cc8819a5451bd04c9698bc0767e49b1 /korganizer/journalentry.cpp
parente27ad31c6016152449bbdaf4f9f387fa61183c37 (diff)
downloadkdepimpi-f731dd9fc5b3f14c44d4de26eb5370a79c63887c.zip
kdepimpi-f731dd9fc5b3f14c44d4de26eb5370a79c63887c.tar.gz
kdepimpi-f731dd9fc5b3f14c44d4de26eb5370a79c63887c.tar.bz2
fixi
Diffstat (limited to 'korganizer/journalentry.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/journalentry.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index b8a4cf2..f0e0f86 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -78,3 +78,4 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
toggleJournal->setPixmap (iconp ) ;
- vb->setStretchFactor (new QLabel(" "+i18n("Title: "),vb),1);
+ QLabel* textLabel = new QLabel(" "+i18n("Title: "),vb);
+ vb->setStretchFactor (textLabel,1);
vb->setStretchFactor( toggleJournal, 1 );
@@ -114,2 +115,7 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
#endif
+ mMaxWidDiff = 3*size - 2*frameWidth() - textLabel->sizeHint().width();
+ mDeskWid = QApplication::desktop()->width();
+ int maxwid = mDeskWid - mMaxWidDiff;
+ mTitle->setMaximumWidth( maxwid/2 +20 );
+ mCalendarBox->setMaximumWidth( maxwid/2 -20 );
mEditor->setWordWrap( KTextEdit::WidgetWidth );
@@ -130,2 +136,16 @@ JournalEntry::~JournalEntry()
}
+void JournalEntry::resizeEvent(QResizeEvent* e )
+{
+#ifndef DESKTOP_VERSION
+ if ( mDeskWid != QApplication::desktop()->width() ) {
+ mDeskWid == QApplication::desktop()->width();
+ int maxwid = mDeskWid - mMaxWidDiff;
+ mTitle->setMaximumWidth( maxwid/2 +20 );
+ mCalendarBox->setMaximumWidth( maxwid/2 -20 );
+ }
+ setMaximumWidth( QApplication::desktop()->width() );
+ qDebug("MAXXX %d ", QApplication::desktop()->width());
+#endif
+ QFrame::resizeEvent( e );
+}
QSize JournalEntry::sizeHint() const