mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-26 01:10:38 -04:00
frontend: Minor Spinbox cleanup
Fixes some minor codestyle problems.
This commit is contained in:
@@ -122,7 +122,7 @@ void DoubleSpinBox::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
// Mouse button was pressed and is not over the spinbox buttons, forward event to the lineEdit.
|
||||
QRect lineEditRect = lineEdit()->geometry();
|
||||
mouseDragYOffset = ((double)height() / 2) - event->position().y();
|
||||
mouseDragYOffset = (static_cast<double>(height()) / 2) - event->position().y();
|
||||
|
||||
if (!lineEditRect.contains(event->pos())) {
|
||||
QPointF localPos = event->pos() - lineEditRect.topLeft();
|
||||
@@ -205,7 +205,7 @@ void DoubleSpinBox::wheelEvent(QWheelEvent *event)
|
||||
|
||||
void DoubleSpinBox::clampCursorPosition()
|
||||
{
|
||||
QSignalBlocker block(lineEdit());
|
||||
QSignalBlocker block{lineEdit()};
|
||||
|
||||
if (suffix().isEmpty() && prefix().isEmpty()) {
|
||||
return;
|
||||
|
||||
@@ -121,7 +121,7 @@ void SpinBox::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
// Mouse button was pressed and is not over the spinbox buttons, forward event to the lineEdit.
|
||||
QRect lineEditRect = lineEdit()->geometry();
|
||||
mouseDragYOffset = ((double)height() / 2) - event->position().y();
|
||||
mouseDragYOffset = (static_cast<double>(height()) / 2) - event->position().y();
|
||||
|
||||
if (!lineEditRect.contains(event->pos())) {
|
||||
QPointF localPos = event->pos() - lineEditRect.topLeft();
|
||||
@@ -129,6 +129,7 @@ void SpinBox::mousePressEvent(QMouseEvent *event)
|
||||
event->buttons(), event->modifiers());
|
||||
|
||||
QCoreApplication::sendEvent(lineEdit(), &forwardEvent);
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -203,7 +204,7 @@ void SpinBox::wheelEvent(QWheelEvent *event)
|
||||
|
||||
void SpinBox::clampCursorPosition()
|
||||
{
|
||||
QSignalBlocker block(lineEdit());
|
||||
QSignalBlocker block{lineEdit()};
|
||||
|
||||
if (suffix().isEmpty() && prefix().isEmpty()) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user