author | zecke <zecke> | 2004-01-19 18:38:28 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-01-19 18:38:28 (UTC) |
commit | e32b27c9f5153dfb68221712ddca612315d6c4cb (patch) (side-by-side diff) | |
tree | c43c130cf5dfc9355311890e576709ac25ae94d1 | |
parent | dc9c0fbaf91e3648e63e192a490c3ac033e6a7de (diff) | |
download | opie-e32b27c9f5153dfb68221712ddca612315d6c4cb.zip opie-e32b27c9f5153dfb68221712ddca612315d6c4cb.tar.gz opie-e32b27c9f5153dfb68221712ddca612315d6c4cb.tar.bz2 |
Fix bug 0001248 by disabling the horizontal scrollbar.
So we truncate by screen width
-rw-r--r-- | core/pim/datebook/datebookdayallday.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/pim/datebook/datebookdayallday.cpp b/core/pim/datebook/datebookdayallday.cpp index 6014eca..2294f3c 100644 --- a/core/pim/datebook/datebookdayallday.cpp +++ b/core/pim/datebook/datebookdayallday.cpp @@ -35,17 +35,18 @@ DatebookdayAllday::DatebookdayAllday(DateBookDB* db, QWidget* parent, const cha if ( !name ) setName( "DatebookdayAllday" ); setMinimumSize( QSize( 0, 0 ) ); setMaximumHeight(3* (QFontMetrics(font()).height()+4) ); m_MainFrame = new QFrame(viewport()); m_MainFrame->setFrameStyle(QFrame::NoFrame|QFrame::Plain); setFrameStyle(QFrame::NoFrame|QFrame::Plain); - setResizePolicy( QScrollView::AutoOneFit ); + setResizePolicy( QScrollView::Default ); + setHScrollBarMode( AlwaysOff ); addChild(m_MainFrame); datebookdayalldayLayout = new QVBoxLayout( m_MainFrame ); datebookdayalldayLayout->setSpacing( 0 ); datebookdayalldayLayout->setMargin( 0 ); lblDesc = new DatebookEventDesc(parent->parentWidget(),""); lblDesc->setBackgroundColor(Qt::yellow); @@ -60,19 +61,20 @@ DatebookdayAllday::~DatebookdayAllday() { // no need to delete child widgets, Qt does it all for us } DatebookAlldayDisp* DatebookdayAllday::addEvent(const EffectiveEvent&ev) { DatebookAlldayDisp * lb; lb = new DatebookAlldayDisp(dateBook,ev,m_MainFrame,NULL); + lb->show(); datebookdayalldayLayout->addWidget(lb); subWidgets.append(lb); - + connect(lb,SIGNAL(displayMe(const Event &)),lblDesc,SLOT(disp_event(const Event&))); ++item_count; return lb; } void DatebookdayAllday::removeAllEvents() { @@ -84,17 +86,17 @@ DatebookAlldayDisp::DatebookAlldayDisp(DateBookDB *db,const EffectiveEvent& ev, QWidget* parent,const char* name,WFlags f) : QLabel(parent,name,f),m_Ev(ev),dateBook(db) { QString strDesc = m_Ev.description(); strDesc = strDesc.replace(QRegExp("<"),"<"); setBackgroundColor(yellow); setText(strDesc); setFrameStyle(QFrame::Raised|QFrame::Panel); - + int s = QFontMetrics(font()).height()+4; setMaximumHeight( s ); setMinimumSize( QSize( 0, s ) ); } DatebookAlldayDisp::~DatebookAlldayDisp() { } |