From a2e3f9d63a574fae661b96fc815cf3855c1762d9 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Wed, 21 Oct 2020 13:46:38 +0200 Subject: [PATCH] Expose Theme on the QML side Signed-off-by: Kevin Ottens --- src/gui/systray.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index 899cbf741..d29456207 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -74,6 +74,12 @@ Systray::Systray() } ); + qmlRegisterSingletonType("com.nextcloud.desktopclient", 1, 0, "Theme", + [](QQmlEngine *, QJSEngine *) -> QObject * { + return Theme::instance(); + } + ); + qmlRegisterSingletonType("com.nextcloud.desktopclient", 1, 0, "Systray", [](QQmlEngine *, QJSEngine *) -> QObject * { return Systray::instance(); -- 2.30.2