when there are no scrollbars just ignore wheel events
BUG:205879 svn path=/trunk/KDE/kdelibs/; revision=1019292
This commit is contained in:
parent
ce98c29765
commit
f25dda51df
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
#include <QGraphicsSceneWheelEvent>
|
||||||
|
|
||||||
#include <kmimetype.h>
|
#include <kmimetype.h>
|
||||||
#include <ktextbrowser.h>
|
#include <ktextbrowser.h>
|
||||||
@ -154,6 +155,16 @@ void TextBrowser::resizeEvent(QGraphicsSceneResizeEvent *event)
|
|||||||
QGraphicsProxyWidget::resizeEvent(event);
|
QGraphicsProxyWidget::resizeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextBrowser::wheelEvent(QGraphicsSceneWheelEvent *event)
|
||||||
|
{
|
||||||
|
if (d->native->verticalScrollBarPolicy() == Qt::ScrollBarAlwaysOff &&
|
||||||
|
d->native->horizontalScrollBarPolicy() == Qt::ScrollBarAlwaysOff) {
|
||||||
|
event->ignore();
|
||||||
|
} else {
|
||||||
|
QGraphicsProxyWidget::wheelEvent(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Plasma
|
} // namespace Plasma
|
||||||
|
|
||||||
#include <textbrowser.moc>
|
#include <textbrowser.moc>
|
||||||
|
@ -99,6 +99,7 @@ Q_SIGNALS:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QGraphicsSceneResizeEvent *event);
|
void resizeEvent(QGraphicsSceneResizeEvent *event);
|
||||||
|
void wheelEvent(QGraphicsSceneWheelEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TextBrowserPrivate * const d;
|
TextBrowserPrivate * const d;
|
||||||
|
Loading…
Reference in New Issue
Block a user