From 5412ccb71c8e1d65ec0e4e4ca7b4d8c79c9d90fd Mon Sep 17 00:00:00 2001 From: Natalie Clarius Date: Thu, 8 Sep 2022 10:04:14 +0300 Subject: [PATCH] plugins/nightcolor: show osd in preview --- src/plugins/nightcolor/nightcolormanager.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/nightcolor/nightcolormanager.cpp b/src/plugins/nightcolor/nightcolormanager.cpp index 2e51836d0c..ffa8ee8291 100644 --- a/src/plugins/nightcolor/nightcolormanager.cpp +++ b/src/plugins/nightcolor/nightcolormanager.cpp @@ -482,6 +482,16 @@ void NightColorManager::preview(uint previewTemp) m_previewTimer->setSingleShot(true); connect(m_previewTimer, &QTimer::timeout, this, &NightColorManager::stopPreview); m_previewTimer->start(15000); + + QDBusMessage message = QDBusMessage::createMethodCall( + QStringLiteral("org.kde.plasmashell"), + QStringLiteral("/org/kde/osdService"), + QStringLiteral("org.kde.osdService"), + QStringLiteral("showText")); + message.setArguments( + {QStringLiteral("preferences-desktop-display-nightcolor-on"), + i18n("Color Temperature Preview")}); + QDBusConnection::sessionBus().asyncCall(message); } void NightColorManager::stopPreview()