Diffstat (limited to 'libopie2/opieui/opopupmenu.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/opopupmenu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opieui/opopupmenu.cpp b/libopie2/opieui/opopupmenu.cpp index 50c613f..5ce048e 100644 --- a/libopie2/opieui/opopupmenu.cpp +++ b/libopie2/opieui/opopupmenu.cpp @@ -76,25 +76,25 @@ void OPopupTitle::setText( const QString &text ) void OPopupTitle::setIcon( const QPixmap &pix ) { miniicon = pix; int w = miniicon.width()+fontMetrics().width(titleStr); int h = QMAX( fontMetrics().height(), miniicon.height() ); setMinimumSize( w+16, h+8 ); } void OPopupTitle::paintEvent(QPaintEvent *) { QRect r(rect()); QPainter p(this); - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 qApp->style().drawPrimitive(QStyle::PE_HeaderSection, &p, r, palette().active()); #else #warning OPopupMenu is not fully functional on Qt2 #endif if (!miniicon.isNull()) p.drawPixmap(4, (r.height()-miniicon.height())/2, miniicon); if (!titleStr.isNull()) { p.setPen(palette().active().text()); QFont f = p.font(); @@ -540,25 +540,25 @@ void OPopupMenu::ctxMenuHiding() bool OPopupMenu::eventFilter(QObject* obj, QEvent* event) { if (d->m_ctxMenu && obj == this) { if (event->type() == QEvent::MouseButtonRelease) { if (d->m_ctxMenu->isVisible()) { return true; } } - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 else if (event->type() == QEvent::ContextMenu) #else else if ( (event->type() == QEvent::MouseButtonPress) && ( (QMouseEvent*) event )->button() == QMouseEvent::RightButton ) #endif { showCtxMenu(mapFromGlobal(QCursor::pos())); return true; } } return QWidget::eventFilter(obj, event); |