plugins/nightcolor: show osd in preview
This commit is contained in:
parent
9c56adf8f2
commit
5412ccb71c
1 changed files with 10 additions and 0 deletions
|
@ -482,6 +482,16 @@ void NightColorManager::preview(uint previewTemp)
|
||||||
m_previewTimer->setSingleShot(true);
|
m_previewTimer->setSingleShot(true);
|
||||||
connect(m_previewTimer, &QTimer::timeout, this, &NightColorManager::stopPreview);
|
connect(m_previewTimer, &QTimer::timeout, this, &NightColorManager::stopPreview);
|
||||||
m_previewTimer->start(15000);
|
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()
|
void NightColorManager::stopPreview()
|
||||||
|
|
Loading…
Reference in a new issue