Disable use of Qt APIs deprecated in 5.15.0 and earlier versions (#4133)

This commit is contained in:
kornes
2022-11-10 19:11:40 +00:00
committed by GitHub
parent 3303cdc0cb
commit fbfa5e0f41
21 changed files with 36 additions and 36 deletions
+4 -3
View File
@@ -144,7 +144,7 @@ void BaseWindow::init()
{
QHBoxLayout *buttonLayout = this->ui_.titlebarBox =
new QHBoxLayout();
buttonLayout->setMargin(0);
buttonLayout->setContentsMargins(0, 0, 0, 0);
layout->addLayout(buttonLayout);
// title
@@ -343,14 +343,15 @@ bool BaseWindow::event(QEvent *event)
void BaseWindow::wheelEvent(QWheelEvent *event)
{
if (event->orientation() != Qt::Vertical)
// ignore horizontal mouse wheels
if (event->angleDelta().x() != 0)
{
return;
}
if (event->modifiers() & Qt::ControlModifier)
{
if (event->delta() > 0)
if (event->angleDelta().y() > 0)
{
getSettings()->setClampedUiScale(
getSettings()->getClampedUiScale() + 0.1);