diff --git a/src/blackgui/components/textmessagecomponent.ui b/src/blackgui/components/textmessagecomponent.ui
index 15299833b..98749e5c9 100644
--- a/src/blackgui/components/textmessagecomponent.ui
+++ b/src/blackgui/components/textmessagecomponent.ui
@@ -6,7 +6,7 @@
0
0
- 260
+ 300
367
@@ -159,9 +159,6 @@
true
-
- 10
-
@@ -200,9 +197,6 @@
true
-
- 10
-
diff --git a/src/blackgui/guiutility.cpp b/src/blackgui/guiutility.cpp
index 6fae3ad13..b82fce791 100644
--- a/src/blackgui/guiutility.cpp
+++ b/src/blackgui/guiutility.cpp
@@ -690,7 +690,9 @@ namespace BlackGui
void CGuiUtility::centerWidget(QWidget *widget)
{
- const QRect screenGeometry = QApplication::desktop()->screenGeometry();
+ // const QRect screenGeometry = QApplication::desktop()->screenGeometry();
+ const QScreen *pScreen = QGuiApplication::screenAt(widget->mapToGlobal({widget->width() / 2, 0}));
+ const QRect screenGeometry = pScreen->availableGeometry();
const int x = (screenGeometry.width() - widget->width()) / 2;
const int y = (screenGeometry.height() - widget->height()) / 2;
widget->move(x, y);