summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditordetails.cpp102
-rw-r--r--korganizer/koeditorgeneral.cpp16
-rw-r--r--korganizer/koeventeditor.cpp4
-rw-r--r--korganizer/kotodoeditor.cpp2
-rw-r--r--korganizer/searchdialog.cpp4
5 files changed, 82 insertions, 46 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 802261c..bdfc637 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -90,4 +90,6 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
if ( QApplication::desktop()->width() <= 320 ) {
- //mListView->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding) );
- mListView->setFixedHeight(80);
+ int hei = 80;
+ if ( QApplication::desktop()->height() <= 240 )
+ hei = 60;
+ mListView->setFixedHeight(hei);
}
@@ -149,42 +151,60 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
//mRoleCombo->setFixedSize( mRoleCombo->sizeHint () );
-
- if (qApp->desktop()->width() < 640 ) {
- if ( qApp->desktop()->width() < 300 )
- topLayout->setSpacing(1);
- ;//mListView->setFixedHeight(80);
- topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3);
- topLayout->addMultiCellWidget(mListView,1,1,0,3);
- topLayout->addWidget(attendeeLabel,3,0);
- topLayout->addMultiCellWidget(mNameEdit,3,3,1,2);
- topLayout->addWidget(emailLabel,4,0);
- topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2);
- topLayout->addWidget(attendeeRoleLabel,5,0);
- topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3);
- topLayout->addWidget(statusLabel,6,0);
- topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3);
- topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3);
- topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
- topLayout->addMultiCellWidget(buttonBox,3,4,3,3);
- topLayout->setRowStretch(1,2);
- topLayout->setColStretch(0,0);
- topLayout->setColStretch(1,2);
- topLayout->setColStretch(2,1);
- topLayout->setColStretch(3,1);
-
- } else {
+ if ( QApplication::desktop()->height() <= 240 ) {
+ mRoleCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Minimum ,FALSE) );
+ mStatusCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Minimum ,FALSE) );
topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
- topLayout->addMultiCellWidget(mListView,1,1,0,5);
- topLayout->addWidget(attendeeLabel,3,0);
- topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
- topLayout->addWidget(emailLabel,4,0);
- topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
- topLayout->addWidget(attendeeRoleLabel,5,0);
- topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
- topLayout->addWidget(statusLabel,5,3);
- topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
- topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5);
- topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
- topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
- topLayout->setRowStretch(1,5);
- topLayout->setColStretch(0,0);
+ topLayout->addMultiCellWidget(mListView,1,1,0,5);
+ topLayout->addWidget(attendeeLabel,3,0);
+ topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
+ topLayout->addWidget(emailLabel,4,0);
+ topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
+ topLayout->addWidget(attendeeRoleLabel,5,0);
+ topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
+ topLayout->addWidget(statusLabel,5,3);
+ topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
+ topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,5);
+ topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
+ topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
+ topLayout->setRowStretch(1,5);
+ topLayout->setColStretch(0,0);
+ } else {
+ if (qApp->desktop()->width() < 640 ) {
+ if ( qApp->desktop()->width() < 300 )
+ topLayout->setSpacing(1);
+ ;//mListView->setFixedHeight(80);
+ topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3);
+ topLayout->addMultiCellWidget(mListView,1,1,0,3);
+ topLayout->addWidget(attendeeLabel,3,0);
+ topLayout->addMultiCellWidget(mNameEdit,3,3,1,2);
+ topLayout->addWidget(emailLabel,4,0);
+ topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2);
+ topLayout->addWidget(attendeeRoleLabel,5,0);
+ topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3);
+ topLayout->addWidget(statusLabel,6,0);
+ topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3);
+ topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3);
+ topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
+ topLayout->addMultiCellWidget(buttonBox,3,4,3,3);
+ topLayout->setRowStretch(1,2);
+ topLayout->setColStretch(0,0);
+ topLayout->setColStretch(1,2);
+ topLayout->setColStretch(2,1);
+ topLayout->setColStretch(3,1);
+ } else {
+ topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
+ topLayout->addMultiCellWidget(mListView,1,1,0,5);
+ topLayout->addWidget(attendeeLabel,3,0);
+ topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
+ topLayout->addWidget(emailLabel,4,0);
+ topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
+ topLayout->addWidget(attendeeRoleLabel,5,0);
+ topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
+ topLayout->addWidget(statusLabel,5,3);
+ topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
+ topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5);
+ topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
+ topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
+ topLayout->setRowStretch(1,5);
+ topLayout->setColStretch(0,0);
+ }
}
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 0045b7f..bfe0aec 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -95,3 +95,6 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
QLabel *locationLabel = new QLabel(i18n("Location:"),parent);
- headerLayout->addWidget(locationLabel,2,0);
+ if ( QApplication::desktop()->height() < 320 )
+ headerLayout->addWidget(locationLabel,1,2);
+ else
+ headerLayout->addWidget(locationLabel,2,0);
@@ -104,4 +107,11 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) );
- headerLayout->addWidget(mLocationEdit,2,1);
- headerLayout->setColStretch( 1, 10);
+ if ( QApplication::desktop()->height() < 320 ) {
+ headerLayout->addWidget(mLocationEdit,1,3);
+ headerLayout->setColStretch( 1, 10);
+ headerLayout->setColStretch( 3, 10);
+ }
+ else {
+ headerLayout->addWidget(mLocationEdit,2,1);
+ headerLayout->setColStretch( 1, 10);
+ }
}
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index e23e680..02d4a78 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -56,2 +56,4 @@ KOEventEditor::KOEventEditor( Calendar *calendar, QWidget *parent ) :
init();
+ if ( QApplication::desktop()->height() <= 240 )
+ hideButtons();
}
@@ -115,3 +117,3 @@ void KOEventEditor::setupGeneral()
QBoxLayout *buttonLayout;
- if ( QApplication::desktop()->width() < 500 )
+ if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 )
buttonLayout = new QVBoxLayout( topLayout );
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 5513e8b..9073bca 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -61,2 +61,4 @@ KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) :
init();
+ if ( QApplication::desktop()->height() <= 240 )
+ hideButtons();
}
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 007d1f3..59bf1a2 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -116,3 +116,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
layout->addWidget(listView);
-
+ //layout->setStretchFactor( listView, 333 );
+ //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) );
+ //listView->setMaximumHeight( 50 );
listView->readSettings(KOGlobals::config(),"SearchListView Layout");