diff --git a/src/dialogs/CreateRoom.cpp b/src/dialogs/CreateRoom.cpp
index 30dbf83d..153d36c0 100644
--- a/src/dialogs/CreateRoom.cpp
+++ b/src/dialogs/CreateRoom.cpp
@@ -32,7 +32,10 @@ CreateRoom::CreateRoom(QWidget *parent)
auto layout = new QVBoxLayout(this);
layout->setSpacing(conf::modals::WIDGET_SPACING);
- layout->setMargin(conf::modals::WIDGET_MARGIN);
+ layout->setContentsMargins(conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN);
auto buttonLayout = new QHBoxLayout();
buttonLayout->setSpacing(15);
diff --git a/src/dialogs/FallbackAuth.cpp b/src/dialogs/FallbackAuth.cpp
index 2b8dfed9..0d8be237 100644
--- a/src/dialogs/FallbackAuth.cpp
+++ b/src/dialogs/FallbackAuth.cpp
@@ -25,11 +25,13 @@ FallbackAuth::FallbackAuth(const QString &authType, const QString &session, QWid
auto layout = new QVBoxLayout(this);
layout->setSpacing(conf::modals::WIDGET_SPACING);
- layout->setMargin(conf::modals::WIDGET_MARGIN);
+ layout->setContentsMargins(conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN);
auto buttonLayout = new QHBoxLayout();
buttonLayout->setSpacing(8);
- buttonLayout->setMargin(0);
openBtn_ = new QPushButton(tr("Open Fallback in Browser"), this);
cancelBtn_ = new QPushButton(tr("Cancel"), this);
diff --git a/src/dialogs/ImageOverlay.cpp b/src/dialogs/ImageOverlay.cpp
index 551e0041..8890814d 100644
--- a/src/dialogs/ImageOverlay.cpp
+++ b/src/dialogs/ImageOverlay.cpp
@@ -4,7 +4,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include <QApplication>
-#include <QDesktopWidget>
#include <QGuiApplication>
#include <QPainter>
#include <QScreen>
diff --git a/src/dialogs/Logout.cpp b/src/dialogs/Logout.cpp
index d10e4cdf..45cef6a5 100644
--- a/src/dialogs/Logout.cpp
+++ b/src/dialogs/Logout.cpp
@@ -25,11 +25,13 @@ Logout::Logout(QWidget *parent)
auto layout = new QVBoxLayout(this);
layout->setSpacing(conf::modals::WIDGET_SPACING);
- layout->setMargin(conf::modals::WIDGET_MARGIN);
+ layout->setContentsMargins(conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN);
auto buttonLayout = new QHBoxLayout();
buttonLayout->setSpacing(0);
- buttonLayout->setMargin(0);
confirmBtn_ = new QPushButton("Logout", this);
cancelBtn_ = new QPushButton(tr("Cancel"), this);
diff --git a/src/dialogs/PreviewUploadOverlay.cpp b/src/dialogs/PreviewUploadOverlay.cpp
index 2e95bd91..338f0635 100644
--- a/src/dialogs/PreviewUploadOverlay.cpp
+++ b/src/dialogs/PreviewUploadOverlay.cpp
@@ -33,7 +33,6 @@ PreviewUploadOverlay::PreviewUploadOverlay(QWidget *parent)
hlayout->addStretch(1);
hlayout->addWidget(&cancel_);
hlayout->addWidget(&upload_);
- hlayout->setMargin(0);
auto vlayout = new QVBoxLayout{this};
vlayout->addWidget(&titleLabel_);
@@ -41,7 +40,10 @@ PreviewUploadOverlay::PreviewUploadOverlay(QWidget *parent)
vlayout->addWidget(&fileName_);
vlayout->addLayout(hlayout);
vlayout->setSpacing(conf::modals::WIDGET_SPACING);
- vlayout->setMargin(conf::modals::WIDGET_MARGIN);
+ vlayout->setContentsMargins(conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN);
upload_.setDefault(true);
connect(&upload_, &QPushButton::clicked, [this]() {
@@ -217,4 +219,4 @@ PreviewUploadOverlay::keyPressEvent(QKeyEvent *event)
} else {
QWidget::keyPressEvent(event);
}
-}
\ No newline at end of file
+}
diff --git a/src/dialogs/ReCaptcha.cpp b/src/dialogs/ReCaptcha.cpp
index 0ae46bba..982c17b6 100644
--- a/src/dialogs/ReCaptcha.cpp
+++ b/src/dialogs/ReCaptcha.cpp
@@ -25,11 +25,13 @@ ReCaptcha::ReCaptcha(const QString &session, QWidget *parent)
auto layout = new QVBoxLayout(this);
layout->setSpacing(conf::modals::WIDGET_SPACING);
- layout->setMargin(conf::modals::WIDGET_MARGIN);
+ layout->setContentsMargins(conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN,
+ conf::modals::WIDGET_MARGIN);
auto buttonLayout = new QHBoxLayout();
buttonLayout->setSpacing(8);
- buttonLayout->setMargin(0);
openCaptchaBtn_ = new QPushButton("Open reCAPTCHA", this);
cancelBtn_ = new QPushButton(tr("Cancel"), this);
|