mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-06 22:35:10 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user