summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-09 11:21:22 (UTC)
committer zautrix <zautrix>2005-07-09 11:21:22 (UTC)
commite98b8d5a8e01d5dd7cf6b8967d1065d72f61c908 (patch) (side-by-side diff)
tree0687ea02ba6cd6071cad137593b8d0e0e21e910f
parentb51db424f4b1e558ab8c7c723859bb564c99d83b (diff)
downloadkdepimpi-e98b8d5a8e01d5dd7cf6b8967d1065d72f61c908.zip
kdepimpi-e98b8d5a8e01d5dd7cf6b8967d1065d72f61c908.tar.gz
kdepimpi-e98b8d5a8e01d5dd7cf6b8967d1065d72f61c908.tar.bz2
fixxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/journalentry.cpp35
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) :
vb->setStretchFactor( toggleJournal, 1 );
mTitle = new KOLocationBox(TRUE, vb, 30);
- mTitle->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding ,QSizePolicy::Fixed ,FALSE) );
+ mTitle->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) );
mCalendarBox = new QComboBox(vb);
- mCalendarBox->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding ,QSizePolicy::Fixed ,FALSE) );
+ mCalendarBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) );
#ifndef DESKTOP_VERSION
mTitle->setSizeLimit( 8 );
@@ -89,5 +89,8 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
#endif
vb->setStretchFactor ( mTitle, 8 );
- vb->setStretchFactor ( mCalendarBox, 3 );
+ int limit = 3;
+ if ( QApplication::desktop()->width() < 640 )
+ limit = 6;
+ vb->setStretchFactor ( mCalendarBox, limit );
//mTitleLabel->setMargin(0);
//mTitleLabel->setAlignment(AlignCenter);
@@ -117,6 +120,12 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
mDeskWid = QApplication::desktop()->width();
int maxwid = mDeskWid - mMaxWidDiff;
- mTitle->setMaximumWidth( maxwid/2 +20 );
- mCalendarBox->setMaximumWidth( maxwid/2 -20 );
+ if ( QApplication::desktop()->width() < 640 ) {
+ mTitle->setMaximumWidth( maxwid/2 +20 );
+ mCalendarBox->setMaximumWidth( maxwid/2 -20);
+ } else {
+ mTitle->setMaximumWidth( (maxwid/4)*3);
+ mCalendarBox->setMaximumWidth( maxwid/2 );
+ }
+ //mCalendarBox->setMaximumWidth( maxwid/2 -20 );
mEditor->setWordWrap( KTextEdit::WidgetWidth );
QBoxLayout *topLayout = new QVBoxLayout(this);
@@ -138,12 +147,20 @@ 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 );
+ if ( QApplication::desktop()->width() < 640 ) {
+ mTitle->setMaximumWidth( maxwid/2 +20 );
+ mCalendarBox->setMaximumWidth( maxwid/2 -20);
+ }
+ else {
+ mTitle->setMaximumWidth( (maxwid/4)*3);
+ mCalendarBox->setMaximumWidth( maxwid/2 );
+ }
+ //mCalendarBox->setMaximumWidth( maxwid/2 -20 );
}
- setMaximumWidth( QApplication::desktop()->width() );
- qDebug("MAXXX %d ", QApplication::desktop()->width());
+ //setMaximumWidth( QApplication::desktop()->width() );
+ //qDebug("MAXXX %d ", QApplication::desktop()->width());
#endif
QFrame::resizeEvent( e );