summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-29 14:38:22 (UTC)
committer zautrix <zautrix>2005-07-29 14:38:22 (UTC)
commit50b0d4463cf13ae27e45e54b48b2911a3ceb5f9f (patch) (side-by-side diff)
tree66e4544dd5528d342871b955f000ec4bd0de79b5 /korganizer
parent43a46672f4212c9617c753e0aa591f781d2e5240 (diff)
downloadkdepimpi-50b0d4463cf13ae27e45e54b48b2911a3ceb5f9f.zip
kdepimpi-50b0d4463cf13ae27e45e54b48b2911a3ceb5f9f.tar.gz
kdepimpi-50b0d4463cf13ae27e45e54b48b2911a3ceb5f9f.tar.bz2
layout fix
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/journalentry.cpp7
-rw-r--r--korganizer/koeditorgeneral.cpp7
2 files changed, 10 insertions, 4 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 739949d..5fc3f2f 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -72,18 +72,16 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
visibleMode = true;
QHBox * vb = new QHBox ( this );
QPixmap iconp;
vb->setMargin ( KDialog::marginHint()-1 );
QPushButton * toggleJournal = new QPushButton( vb );
iconp = SmallIcon("1updownarrow");
toggleJournal->setPixmap (iconp ) ;
QLabel* textLabel = new QLabel(" "+i18n("Title: "),vb);
- vb->setStretchFactor (textLabel,1);
- vb->setStretchFactor( toggleJournal, 1 );
mTitle = new KOLocationBox(TRUE, vb, 30);
mTitle->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) );
mCalendarBox = new QComboBox(vb);
mCalendarBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) );
#ifndef DESKTOP_VERSION
mTitle->setSizeLimit( 8 );
mCalendarBox->setSizeLimit( 8 );
#endif
@@ -104,17 +102,20 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
int size = saveTemplate->sizeHint().height();
if ( QApplication::desktop()->width() < 321 )
iconp = SmallIcon("fileimport16");
else
iconp = SmallIcon("fileimport");
loadTemplate->setPixmap (iconp ) ;
loadTemplate->setFixedSize( size, size );
saveTemplate->setFixedSize( size, size );
- toggleJournal->setFixedSize( size , size );
+ int widwid = size;
+ if ( QApplication::desktop()->width() < 320 )
+ widwid = size/2+1;
+ toggleJournal->setFixedSize( widwid , size );
mTitle->setFixedHeight( size+4);
mCalendarBox->setFixedHeight( size+4);
mEditor = new KTextEdit(this);
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( mEditor, QPEApplication::RightOnHold );
#endif
mMaxWidDiff = 3*size - 2*frameWidth() - textLabel->sizeHint().width();
mDeskWid = QApplication::desktop()->width();
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index aa55d82..e601eef 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -120,17 +120,22 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
headerLayout->addWidget(mCalendarBox,0,4);
headerLayout->setColStretch( 1, 10);
headerLayout->setColStretch( 3, 10);
mCalendarBox->setMaximumWidth( 64 );
}
else {
headerLayout->addWidget(mLocationEdit,1,1);
headerLayout->addWidget(mCalendarBox,1,2);
- headerLayout->setColStretch( 1, 3);
+ int str = 3;
+ if ( QApplication::desktop()->width() < 320 ) {
+ --str;
+ --str;
+ }
+ headerLayout->setColStretch( 1, str);
headerLayout->setColStretch( 2, 1);
}
}
void KOEditorGeneral::setFocusOn( int i )
{
mNextFocus = i;
QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() ));