1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #153 from F1ynn/bugfix

Fix #142
This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-07-21 16:58:09 +02:00
commit f0b0110cfc
2 changed files with 17 additions and 0 deletions

View File

@ -188,6 +188,8 @@ Widget::Widget(QWidget *parent) :
ui->pbClose->setMouseTracking(true); ui->pbClose->setMouseTracking(true);
ui->statusHead->setMouseTracking(true); ui->statusHead->setMouseTracking(true);
ui->friendList->viewport()->installEventFilter(this);
QList<int> currentSizes = ui->centralWidget->sizes(); QList<int> currentSizes = ui->centralWidget->sizes();
currentSizes[0] = 225; currentSizes[0] = 225;
ui->centralWidget->setSizes(currentSizes); ui->centralWidget->setSizes(currentSizes);
@ -1199,3 +1201,17 @@ void Widget::setStatusBusy()
{ {
core->setStatus(Status::Busy); core->setStatus(Status::Busy);
} }
bool Widget::eventFilter(QObject *, QEvent *event)
{
if (event->type() == QEvent::Wheel)
{
QWheelEvent * whlEvnt = static_cast< QWheelEvent * >( event );
if (whlEvnt->angleDelta().x() != 0)
{
event->accept();
return true;
}
}
return false;
}

View File

@ -151,6 +151,7 @@ private:
SelfCamView* camview; SelfCamView* camview;
Camera* camera; Camera* camera;
bool notify(QObject *receiver, QEvent *event); bool notify(QObject *receiver, QEvent *event);
bool eventFilter(QObject *, QEvent *event);
}; };
#endif // WIDGET_H #endif // WIDGET_H