author | zautrix <zautrix> | 2005-07-09 11:21:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-09 11:21:22 (UTC) |
commit | e98b8d5a8e01d5dd7cf6b8967d1065d72f61c908 (patch) (unidiff) | |
tree | 0687ea02ba6cd6071cad137593b8d0e0e21e910f /korganizer | |
parent | b51db424f4b1e558ab8c7c723859bb564c99d83b (diff) | |
download | kdepimpi-e98b8d5a8e01d5dd7cf6b8967d1065d72f61c908.zip kdepimpi-e98b8d5a8e01d5dd7cf6b8967d1065d72f61c908.tar.gz kdepimpi-e98b8d5a8e01d5dd7cf6b8967d1065d72f61c908.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/journalentry.cpp | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index f0e0f86..739949d 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp | |||
@@ -81,7 +81,7 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
81 | vb->setStretchFactor( toggleJournal, 1 ); | 81 | vb->setStretchFactor( toggleJournal, 1 ); |
82 | mTitle = new KOLocationBox(TRUE, vb, 30); | 82 | mTitle = new KOLocationBox(TRUE, vb, 30); |
83 | mTitle->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding ,QSizePolicy::Fixed ,FALSE) ); | 83 | mTitle->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) ); |
84 | mCalendarBox = new QComboBox(vb); | 84 | mCalendarBox = new QComboBox(vb); |
85 | mCalendarBox->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding ,QSizePolicy::Fixed ,FALSE) ); | 85 | mCalendarBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) ); |
86 | #ifndef DESKTOP_VERSION | 86 | #ifndef DESKTOP_VERSION |
87 | mTitle->setSizeLimit( 8 ); | 87 | mTitle->setSizeLimit( 8 ); |
@@ -89,5 +89,8 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
89 | #endif | 89 | #endif |
90 | vb->setStretchFactor ( mTitle, 8 ); | 90 | vb->setStretchFactor ( mTitle, 8 ); |
91 | vb->setStretchFactor ( mCalendarBox, 3 ); | 91 | int limit = 3; |
92 | if ( QApplication::desktop()->width() < 640 ) | ||
93 | limit = 6; | ||
94 | vb->setStretchFactor ( mCalendarBox, limit ); | ||
92 | //mTitleLabel->setMargin(0); | 95 | //mTitleLabel->setMargin(0); |
93 | //mTitleLabel->setAlignment(AlignCenter); | 96 | //mTitleLabel->setAlignment(AlignCenter); |
@@ -117,6 +120,12 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
117 | mDeskWid = QApplication::desktop()->width(); | 120 | mDeskWid = QApplication::desktop()->width(); |
118 | int maxwid = mDeskWid - mMaxWidDiff; | 121 | int maxwid = mDeskWid - mMaxWidDiff; |
119 | mTitle->setMaximumWidth( maxwid/2 +20 ); | 122 | if ( QApplication::desktop()->width() < 640 ) { |
120 | mCalendarBox->setMaximumWidth( maxwid/2 -20 ); | 123 | mTitle->setMaximumWidth( maxwid/2 +20 ); |
124 | mCalendarBox->setMaximumWidth( maxwid/2 -20); | ||
125 | } else { | ||
126 | mTitle->setMaximumWidth( (maxwid/4)*3); | ||
127 | mCalendarBox->setMaximumWidth( maxwid/2 ); | ||
128 | } | ||
129 | //mCalendarBox->setMaximumWidth( maxwid/2 -20 ); | ||
121 | mEditor->setWordWrap( KTextEdit::WidgetWidth ); | 130 | mEditor->setWordWrap( KTextEdit::WidgetWidth ); |
122 | QBoxLayout *topLayout = new QVBoxLayout(this); | 131 | QBoxLayout *topLayout = new QVBoxLayout(this); |
@@ -138,12 +147,20 @@ void JournalEntry::resizeEvent(QResizeEvent* e ) | |||
138 | { | 147 | { |
139 | #ifndef DESKTOP_VERSION | 148 | #ifndef DESKTOP_VERSION |
149 | |||
140 | if ( mDeskWid != QApplication::desktop()->width() ) { | 150 | if ( mDeskWid != QApplication::desktop()->width() ) { |
141 | mDeskWid == QApplication::desktop()->width(); | 151 | mDeskWid == QApplication::desktop()->width(); |
142 | int maxwid = mDeskWid - mMaxWidDiff; | 152 | int maxwid = mDeskWid - mMaxWidDiff; |
143 | mTitle->setMaximumWidth( maxwid/2 +20 ); | 153 | if ( QApplication::desktop()->width() < 640 ) { |
144 | mCalendarBox->setMaximumWidth( maxwid/2 -20 ); | 154 | mTitle->setMaximumWidth( maxwid/2 +20 ); |
155 | mCalendarBox->setMaximumWidth( maxwid/2 -20); | ||
156 | } | ||
157 | else { | ||
158 | mTitle->setMaximumWidth( (maxwid/4)*3); | ||
159 | mCalendarBox->setMaximumWidth( maxwid/2 ); | ||
160 | } | ||
161 | //mCalendarBox->setMaximumWidth( maxwid/2 -20 ); | ||
145 | } | 162 | } |
146 | setMaximumWidth( QApplication::desktop()->width() ); | 163 | //setMaximumWidth( QApplication::desktop()->width() ); |
147 | qDebug("MAXXX %d ", QApplication::desktop()->width()); | 164 | //qDebug("MAXXX %d ", QApplication::desktop()->width()); |
148 | #endif | 165 | #endif |
149 | QFrame::resizeEvent( e ); | 166 | QFrame::resizeEvent( e ); |