UI: Fix warnings for Qt 5.15
AllDockWidgetFeatures is now deprecated. Use underlying values instead. Use default QFlags constructor instead of nullptr/0. Use QWheelEvent::angleDelta() in place of orientation() and delta(), and position() in place of x() and y().
This commit is contained in:
parent
b1d03ae367
commit
c2ddc428b0
10 changed files with 46 additions and 27 deletions
|
|
@ -495,13 +495,15 @@ void OBSBasicPreview::keyReleaseEvent(QKeyEvent *event)
|
|||
|
||||
void OBSBasicPreview::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
if (scrollMode && IsFixedScaling() &&
|
||||
event->orientation() == Qt::Vertical) {
|
||||
if (event->delta() > 0)
|
||||
SetScalingLevel(scalingLevel + 1);
|
||||
else if (event->delta() < 0)
|
||||
SetScalingLevel(scalingLevel - 1);
|
||||
emit DisplayResized();
|
||||
if (scrollMode && IsFixedScaling()) {
|
||||
const int delta = event->angleDelta().y();
|
||||
if (delta != 0) {
|
||||
if (delta > 0)
|
||||
SetScalingLevel(scalingLevel + 1);
|
||||
else
|
||||
SetScalingLevel(scalingLevel - 1);
|
||||
emit DisplayResized();
|
||||
}
|
||||
}
|
||||
|
||||
OBSQTDisplay::wheelEvent(event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue