diff -r 923ff622b8b9 -r 4633027730f5 src/hbcore/gui/hbpopupmanager.cpp --- a/src/hbcore/gui/hbpopupmanager.cpp Tue Jul 06 14:36:53 2010 +0300 +++ b/src/hbcore/gui/hbpopupmanager.cpp Wed Aug 18 10:05:37 2010 +0300 @@ -45,9 +45,7 @@ HbPopupLayoutSpacer::HbPopupLayoutSpacer( QGraphicsItem *parent ) : HbWidgetBase( parent ) { -#if QT_VERSION >= 0x040600 setFlag(QGraphicsItem::ItemHasNoContents, true); -#endif setAcceptedMouseButtons(Qt::NoButton); } @@ -61,23 +59,10 @@ return QSizeF(0.f,0.f); } -/* -\reimp -*/ -void HbPopupLayoutSpacer::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ) -{ - Q_UNUSED(option) - Q_UNUSED(widget); - Q_UNUSED(painter); -} - - HbPopupLayoutProxy::HbPopupLayoutProxy( HbPopup *popup, QGraphicsItem *parent ) : HbWidgetBase(parent), mPopup(popup) { -#if QT_VERSION >= 0x040600 setFlag(QGraphicsItem::ItemHasNoContents, true); -#endif setAcceptedMouseButtons(Qt::NoButton); popup->installEventFilter(this); } @@ -195,25 +180,15 @@ return false; } - -/* -\reimp -*/ -void HbPopupLayoutProxy::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ) -{ - Q_UNUSED(option); - Q_UNUSED(widget); - Q_UNUSED(painter); -} - HbPopupLayoutManager::HbPopupLayoutManager( HbPopup *popup, QGraphicsScene *scene ) : HbWidget() { -#if QT_VERSION >= 0x040600 setFlag(QGraphicsItem::ItemHasNoContents, true); -#endif setAcceptedMouseButtons(Qt::NoButton); scene->addItem( this ); + //adjust the size of popuplayoutmanager to its preferredSize + //since it defines the geometries of popups. + adjustSize(); // create proxy HbPopupLayoutProxy *childItem = new HbPopupLayoutProxy( popup, this ); @@ -276,16 +251,6 @@ } -/* -\reimp -*/ -void HbPopupLayoutManager::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ) -{ - Q_UNUSED(option) - Q_UNUSED(widget); - Q_UNUSED(painter); -} - /* \class HbPopupManagerPrivate