author | zautrix <zautrix> | 2005-06-30 15:06:11 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-30 15:06:11 (UTC) |
commit | d401e425af46703a89eb80802606edeea06c9538 (patch) (side-by-side diff) | |
tree | e32a98c44e340a6af6706fa99544cba648aa19f1 /korganizer/journalentry.cpp | |
parent | af48ba51eeb7a766ca7b458d2287e55c121388cf (diff) | |
download | kdepimpi-d401e425af46703a89eb80802606edeea06c9538.zip kdepimpi-d401e425af46703a89eb80802606edeea06c9538.tar.gz kdepimpi-d401e425af46703a89eb80802606edeea06c9538.tar.bz2 |
desk fixes
-rw-r--r-- | korganizer/journalentry.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index ca8d5f7..3c38f34 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp @@ -28,65 +28,71 @@ #include <qlayout.h> #include <qvbox.h> #include <qfile.h> #include <qdir.h> #include <qtextstream.h> #include <qtextcodec.h> #include <qpixmap.h> #include <qpushbutton.h> #include <qapplication.h> #include <kdebug.h> #include <kglobal.h> #include <klocale.h> #include <ktextedit.h> #include <kfiledialog.h> #include <kmessagebox.h> #include "koprefs.h" #include <klineedit.h> #include <libkcal/journal.h> #include <libkcal/calendarresources.h> #include <libkcal/resourcecalendar.h> #include <kresources/resourceselectdialog.h> #include "journalentry.h" //#include "journalentry.moc" #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #endif JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : QFrame(parent) { - heiHint = QApplication::desktop()->height() / 5 ; + + int fac = 5; + heiHint = QApplication::desktop()->height(); + if ( heiHint > 800 ) + fac += 2; + heiHint = heiHint / fac; + showOnlyMode = false; mCalendar = calendar; mJournal = 0; visibleMode = true; QHBox * vb = new QHBox ( this ); QPixmap iconp; QPushButton * toggleJournal = new QPushButton( vb ); iconp = SmallIcon("1updownarrow"); toggleJournal->setPixmap (iconp ) ; new QLabel(" "+i18n("Title: "),vb); mTitle = new KLineEdit ( vb ); mTitleLabel = new QLabel(i18n("Title"),vb); mTitleLabel->setMargin(0); mTitleLabel->setAlignment(AlignCenter); QPushButton * loadTemplate = new QPushButton( vb ); QPushButton * saveTemplate = new QPushButton( vb ); if ( QApplication::desktop()->width() < 321 ) iconp = SmallIcon("fileexport16"); else iconp = SmallIcon("fileexport"); saveTemplate->setPixmap (iconp ) ; 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 ); mEditor = new KTextEdit(this); |