summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -82,5 +82,5 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
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
@@ -90,3 +90,6 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
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);
@@ -118,4 +121,10 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
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 );
@@ -139,2 +148,3 @@ void JournalEntry::resizeEvent(QResizeEvent* e )
#ifndef DESKTOP_VERSION
+
if ( mDeskWid != QApplication::desktop()->width() ) {
@@ -142,7 +152,14 @@ void JournalEntry::resizeEvent(QResizeEvent* e )
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