UI: Fix whitespace issues with "ignore wheel" widgets

master
jp9000 2019-04-21 04:05:51 -07:00
parent c3c740d36f
commit 140f927f4f
7 changed files with 5 additions and 19 deletions

View File

@ -5,7 +5,7 @@ ComboBoxIgnoreScroll::ComboBoxIgnoreScroll(QWidget *parent) : QComboBox(parent)
setFocusPolicy(Qt::StrongFocus);
}
void ComboBoxIgnoreScroll::wheelEvent(QWheelEvent * event)
void ComboBoxIgnoreScroll::wheelEvent(QWheelEvent *event)
{
if (!hasFocus())
event->ignore();

View File

@ -4,7 +4,6 @@
#include <QInputEvent>
#include <QtCore/QObject>
class ComboBoxIgnoreScroll : public QComboBox {
Q_OBJECT
@ -12,8 +11,5 @@ public:
ComboBoxIgnoreScroll(QWidget *parent = nullptr);
protected:
virtual void wheelEvent(QWheelEvent *event) override;
};

View File

@ -13,7 +13,7 @@ SliderIgnoreScroll::SliderIgnoreScroll(Qt::Orientation orientation,
setOrientation(orientation);
}
void SliderIgnoreScroll::wheelEvent(QWheelEvent * event)
void SliderIgnoreScroll::wheelEvent(QWheelEvent *event)
{
if (!hasFocus())
event->ignore();

View File

@ -4,9 +4,6 @@
#include <QInputEvent>
#include <QtCore/QObject>
class SliderIgnoreScroll : public QSlider {
Q_OBJECT
@ -15,8 +12,5 @@ public:
SliderIgnoreScroll(Qt::Orientation orientation, QWidget *parent = nullptr);
protected:
virtual void wheelEvent(QWheelEvent *event) override;
};

View File

@ -5,7 +5,7 @@ SpinBoxIgnoreScroll::SpinBoxIgnoreScroll(QWidget *parent) : QSpinBox(parent)
setFocusPolicy(Qt::StrongFocus);
}
void SpinBoxIgnoreScroll::wheelEvent(QWheelEvent * event)
void SpinBoxIgnoreScroll::wheelEvent(QWheelEvent *event)
{
if (!hasFocus())
event->ignore();

View File

@ -4,7 +4,6 @@
#include <QInputEvent>
#include <QtCore/QObject>
class SpinBoxIgnoreScroll : public QSpinBox {
Q_OBJECT
@ -12,8 +11,5 @@ public:
SpinBoxIgnoreScroll(QWidget *parent = nullptr);
protected:
virtual void wheelEvent(QWheelEvent *event) override;
};

View File

@ -504,12 +504,12 @@ void VolumeMeter::setPeakMeterType(enum obs_peak_meter_type peakMeterType)
}
}
void VolumeMeter::mousePressEvent(QMouseEvent * event)
void VolumeMeter::mousePressEvent(QMouseEvent *event)
{
setFocus(Qt::MouseFocusReason);
}
void VolumeMeter::wheelEvent(QWheelEvent * event)
void VolumeMeter::wheelEvent(QWheelEvent *event)
{
QApplication::sendEvent(focusProxy(), event);
}