-rw-r--r-- | korganizer/kojournalview.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index 6fa9b23..9b0e748 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp @@ -50,14 +50,7 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, : KOrg::BaseView(calendar, parent, name) { mCalendar = calendar; - QScrollView * sv = new QScrollView( this ); - QHBoxLayout * hbl = new QHBoxLayout( this ); - hbl->addWidget( sv ); - parWid = new QWidget( sv->viewport() ); - sv->addChild(parWid); - sv->setResizePolicy( QScrollView:: AutoOneFit ); - mTopLayout = new QVBoxLayout(parWid); - QHBox * vb = new QHBox ( parWid ); + QHBox * vb = new QHBox ( this ); QPushButton * newJournal = new QPushButton( vb ); QPixmap icon; if ( QApplication::desktop()->width() < 321 ) @@ -68,9 +61,16 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, int size = newJournal->sizeHint().height(); newJournal->setFixedSize( size, size ); mDateLabel = new QLabel ( vb ); - mTopLayout->addWidget( vb ); mDateLabel->setMargin(1); mDateLabel->setAlignment(AlignCenter); + QScrollView * sv = new QScrollView( this ); + QVBoxLayout * hbl = new QVBoxLayout( this ); + hbl->addWidget( vb ); + hbl->addWidget( sv ); + parWid = new QWidget( sv->viewport() ); + sv->addChild(parWid); + sv->setResizePolicy( QScrollView:: AutoOneFit ); + mTopLayout = new QVBoxLayout(parWid); connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); getNewEntry(); } |