Diffstat (limited to 'core/pim/datebook/datebookdayallday.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookdayallday.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/core/pim/datebook/datebookdayallday.cpp b/core/pim/datebook/datebookdayallday.cpp index 985f31a..6014eca 100644 --- a/core/pim/datebook/datebookdayallday.cpp +++ b/core/pim/datebook/datebookdayallday.cpp | |||
@@ -31,4 +31,4 @@ | |||
31 | */ | 31 | */ |
32 | DatebookdayAllday::DatebookdayAllday(DateBookDB* db, QWidget* parent, const char* name, WFlags fl ) | 32 | DatebookdayAllday::DatebookdayAllday(DateBookDB* db, QWidget* parent, const char* name, WFlags ) |
33 | : QWidget( parent, name,fl ),item_count(0),dateBook(db) | 33 | : QScrollView( parent, name ),item_count(0),dateBook(db) |
34 | { | 34 | { |
@@ -37,4 +37,11 @@ DatebookdayAllday::DatebookdayAllday(DateBookDB* db, QWidget* parent, const cha | |||
37 | setMinimumSize( QSize( 0, 0 ) ); | 37 | setMinimumSize( QSize( 0, 0 ) ); |
38 | setMaximumHeight(3* (QFontMetrics(font()).height()+4) ); | ||
38 | 39 | ||
39 | datebookdayalldayLayout = new QVBoxLayout( this ); | 40 | m_MainFrame = new QFrame(viewport()); |
41 | m_MainFrame->setFrameStyle(QFrame::NoFrame|QFrame::Plain); | ||
42 | setFrameStyle(QFrame::NoFrame|QFrame::Plain); | ||
43 | setResizePolicy( QScrollView::AutoOneFit ); | ||
44 | addChild(m_MainFrame); | ||
45 | |||
46 | datebookdayalldayLayout = new QVBoxLayout( m_MainFrame ); | ||
40 | datebookdayalldayLayout->setSpacing( 0 ); | 47 | datebookdayalldayLayout->setSpacing( 0 ); |
@@ -59,3 +66,3 @@ DatebookAlldayDisp* DatebookdayAllday::addEvent(const EffectiveEvent&ev) | |||
59 | DatebookAlldayDisp * lb; | 66 | DatebookAlldayDisp * lb; |
60 | lb = new DatebookAlldayDisp(dateBook,ev,this,NULL); | 67 | lb = new DatebookAlldayDisp(dateBook,ev,m_MainFrame,NULL); |
61 | datebookdayalldayLayout->addWidget(lb); | 68 | datebookdayalldayLayout->addWidget(lb); |
@@ -84,5 +91,6 @@ DatebookAlldayDisp::DatebookAlldayDisp(DateBookDB *db,const EffectiveEvent& ev, | |||
84 | setFrameStyle(QFrame::Raised|QFrame::Panel); | 91 | setFrameStyle(QFrame::Raised|QFrame::Panel); |
85 | QSize s = sizeHint(); | 92 | |
86 | setMaximumSize( QSize( 32767, s.height()-4 ) ); | 93 | int s = QFontMetrics(font()).height()+4; |
87 | setMinimumSize( QSize( 0, s.height()-4 ) ); | 94 | setMaximumHeight( s ); |
95 | setMinimumSize( QSize( 0, s ) ); | ||
88 | } | 96 | } |
@@ -225,2 +233 @@ void DatebookEventDesc::disp_event(const Event&e) | |||
225 | } | } | |
226 | |||