--- a/src/widgets/util/qsystemtrayicon.cpp
+++ b/src/widgets/util/qsystemtrayicon.cpp
@@ -63,6 +63,7 @@
 #include "qdesktopwidget.h"
 #include <private/qdesktopwidget_p.h>
 #include "qbitmap.h"
+#include "private/qstylehelper_p.h"
 
 #include <private/qhighdpiscaling_p.h>
 #include <qpa/qplatformscreen.h>
@@ -513,8 +514,9 @@
     titleLabel->setTextFormat(Qt::PlainText); // to maintain compat with windows
 #endif
 
-    const int iconSize = 18;
-    const int closeButtonSize = 15;
+    const int smallIconSize = style()->pixelMetric(QStyle::PM_SmallIconSize);
+    const int iconSize = qMin(int(QStyleHelper::dpiScaled(22)), smallIconSize + 2);
+    const int closeButtonSize = qMin(int(QStyleHelper::dpiScaled(24)), smallIconSize - 1);
 
 #if QT_CONFIG(pushbutton)
     QPushButton *closeButton = new QPushButton;
