From 2cf8e80df94c6f8b47ce315d2949aad02ca50f80 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 14 Jan 2022 20:56:28 +0200 Subject: [PATCH] x11:center applet config window on screen --- app/view/view.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/view/view.cpp b/app/view/view.cpp index 0efac248e..c504cdc47 100644 --- a/app/view/view.cpp +++ b/app/view/view.cpp @@ -591,6 +591,14 @@ void View::showConfigurationInterface(Plasma::Applet *applet) } else { m_appletConfigView = new PlasmaQuick::ConfigView(applet); m_appletConfigView.data()->init(); + + //! center applet config window + m_appletConfigView->setScreen(screen()); + QRect scrgeometry = screenGeometry(); + QPoint position{scrgeometry.center().x() - m_appletConfigView->width() / 2, scrgeometry.center().y() - m_appletConfigView->height() / 2 }; + //!under wayland probably needs another workaround + m_appletConfigView->setPosition(position); + m_appletConfigView->show(); } }